{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "程序开始运行\n",
      "程序可以正常运行\n"
     ]
    }
   ],
   "source": [
    "print(\"程序开始运行\")\n",
    "import pandas as pd\n",
    "print(\"程序可以正常运行\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>label\\ttext</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2\\t2967 6758 339 2021 1854 3731 4109 3792 4149...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>11\\t4464 486 6352 5619 2465 4802 1452 3137 577...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3\\t7346 4068 5074 3747 5681 6093 1777 2226 735...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2\\t7159 948 4866 2109 5520 2490 211 3956 5520 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3\\t3646 3055 3055 2490 4659 6065 3370 5814 246...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199995</th>\n",
       "      <td>2\\t307 4894 7539 4853 5330 648 6038 4409 3764 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199996</th>\n",
       "      <td>2\\t3792 2983 355 1070 4464 5050 6298 3782 3130...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199997</th>\n",
       "      <td>11\\t6811 1580 7539 1252 1899 5139 1386 3870 41...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199998</th>\n",
       "      <td>2\\t6405 3203 6644 983 794 1913 1678 5736 1397 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199999</th>\n",
       "      <td>3\\t4350 3878 3268 1699 6909 5505 2376 2465 608...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200000 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                              label\\ttext\n",
       "0       2\\t2967 6758 339 2021 1854 3731 4109 3792 4149...\n",
       "1       11\\t4464 486 6352 5619 2465 4802 1452 3137 577...\n",
       "2       3\\t7346 4068 5074 3747 5681 6093 1777 2226 735...\n",
       "3       2\\t7159 948 4866 2109 5520 2490 211 3956 5520 ...\n",
       "4       3\\t3646 3055 3055 2490 4659 6065 3370 5814 246...\n",
       "...                                                   ...\n",
       "199995  2\\t307 4894 7539 4853 5330 648 6038 4409 3764 ...\n",
       "199996  2\\t3792 2983 355 1070 4464 5050 6298 3782 3130...\n",
       "199997  11\\t6811 1580 7539 1252 1899 5139 1386 3870 41...\n",
       "199998  2\\t6405 3203 6644 983 794 1913 1678 5736 1397 ...\n",
       "199999  3\\t4350 3878 3268 1699 6909 5505 2376 2465 608...\n",
       "\n",
       "[200000 rows x 1 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#数据加载\n",
    "train=pd.read_csv('./train_set.csv')\n",
    "train#这个数据读取这样是有问题的  需要加一个\"/t\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>label</th>\n",
       "      <th>text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>2967 6758 339 2021 1854 3731 4109 3792 4149 15...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>11</td>\n",
       "      <td>4464 486 6352 5619 2465 4802 1452 3137 5778 54...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>7346 4068 5074 3747 5681 6093 1777 2226 7354 6...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>7159 948 4866 2109 5520 2490 211 3956 5520 549...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>3646 3055 3055 2490 4659 6065 3370 5814 2465 5...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199995</th>\n",
       "      <td>2</td>\n",
       "      <td>307 4894 7539 4853 5330 648 6038 4409 3764 603...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199996</th>\n",
       "      <td>2</td>\n",
       "      <td>3792 2983 355 1070 4464 5050 6298 3782 3130 68...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199997</th>\n",
       "      <td>11</td>\n",
       "      <td>6811 1580 7539 1252 1899 5139 1386 3870 4124 1...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199998</th>\n",
       "      <td>2</td>\n",
       "      <td>6405 3203 6644 983 794 1913 1678 5736 1397 191...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199999</th>\n",
       "      <td>3</td>\n",
       "      <td>4350 3878 3268 1699 6909 5505 2376 2465 6088 2...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200000 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        label                                               text\n",
       "0           2  2967 6758 339 2021 1854 3731 4109 3792 4149 15...\n",
       "1          11  4464 486 6352 5619 2465 4802 1452 3137 5778 54...\n",
       "2           3  7346 4068 5074 3747 5681 6093 1777 2226 7354 6...\n",
       "3           2  7159 948 4866 2109 5520 2490 211 3956 5520 549...\n",
       "4           3  3646 3055 3055 2490 4659 6065 3370 5814 2465 5...\n",
       "...       ...                                                ...\n",
       "199995      2  307 4894 7539 4853 5330 648 6038 4409 3764 603...\n",
       "199996      2  3792 2983 355 1070 4464 5050 6298 3782 3130 68...\n",
       "199997     11  6811 1580 7539 1252 1899 5139 1386 3870 4124 1...\n",
       "199998      2  6405 3203 6644 983 794 1913 1678 5736 1397 191...\n",
       "199999      3  4350 3878 3268 1699 6909 5505 2376 2465 6088 2...\n",
       "\n",
       "[200000 rows x 2 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train=pd.read_csv('./train_set.csv',sep='\\t')\n",
    "train#text字符已经进行了脱敏处理 就是变成了lableEncoder了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5399 3117 1070 4321 4568 2621 5466 3772 4516 2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2491 4109 1757 7539 648 3695 3038 4490 23 7019...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2673 5076 6835 2835 5948 5677 3247 4124 2465 5...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4562 4893 2210 4761 3659 1324 2595 5949 4583 2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4269 7134 2614 1724 4464 1324 3370 3370 2106 2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49995</th>\n",
       "      <td>3725 4498 2282 1647 6293 4245 4498 3615 1141 2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49996</th>\n",
       "      <td>4811 465 3800 1394 3038 2376 2327 5165 3070 57...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49997</th>\n",
       "      <td>5338 1952 3117 4109 299 6656 6654 3792 6831 21...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49998</th>\n",
       "      <td>893 3469 5775 584 2490 4223 6569 6663 2124 168...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49999</th>\n",
       "      <td>2400 4409 4412 2210 5122 4464 7186 2465 1327 9...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>50000 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                    text\n",
       "0      5399 3117 1070 4321 4568 2621 5466 3772 4516 2...\n",
       "1      2491 4109 1757 7539 648 3695 3038 4490 23 7019...\n",
       "2      2673 5076 6835 2835 5948 5677 3247 4124 2465 5...\n",
       "3      4562 4893 2210 4761 3659 1324 2595 5949 4583 2...\n",
       "4      4269 7134 2614 1724 4464 1324 3370 3370 2106 2...\n",
       "...                                                  ...\n",
       "49995  3725 4498 2282 1647 6293 4245 4498 3615 1141 2...\n",
       "49996  4811 465 3800 1394 3038 2376 2327 5165 3070 57...\n",
       "49997  5338 1952 3117 4109 299 6656 6654 3792 6831 21...\n",
       "49998  893 3469 5775 584 2490 4223 6569 6663 2124 168...\n",
       "49999  2400 4409 4412 2210 5122 4464 7186 2465 1327 9...\n",
       "\n",
       "[50000 rows x 1 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#同样test也可以这样处理\n",
    "test=pd.read_csv('./test_a.csv',sep='\\t')\n",
    "test#这样就完成了数据的读取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2967 6758 339 2021 1854 3731 4109 3792 4149 1519 2058 3912 2465 2410 1219 6654 7539 264 2456 4811 1292 2109 6905 5520 7058 6045 3634 6591 3530 6508 2465 7044 1519 3659 2073 3750 3731 4109 3792 6831 2614 3370 4269 3370 486 5770 4109 4125 3750 5445 2466 6831 6758 3743 3630 1726 2313 5906 826 4516 657 900 1871 7044 3750 2967 3731 1757 1939 648 2828 4704 7039 3706 3750 965 2490 7399 3743 2145 2407 7451 3775 6017 5998 1641 299 4704 2621 7029 3056 6333 433 648 1667 1099 900 2289 1099 648 5780 220 7044 1279 7426 4269 3750 2967 6758 6631 3099 2205 7305 2620 5977 3750 3329 1793 6666 2042 3193 4149 1519 7039 3706 2446 5399 648 4124 2058 3912 248 3193 2252 5649 2212 4939 7239 3310 4525 2400 900 5770 4109 4125 7044 4921 265 1397 4699 1699 669 6407 3750 1271 1271 4741 669 4659 3870 4030 4167 5338 25 3466 6909 4417 1859 3750 1465 7194 648 3938 1571 848 6986 827 2124 3750 1991 7444 7037 2729 908 6308 3750 1889 6810 4190 591 5598 2289 2109 6831 6407 2400 5410 517 900 25 3731 4109 3792 4128 1679 4811 4853 4109 3630 6902 6122 1903 1736 3915 2602 6822 3750 6630 4265 591 729 4448 648 1465 1401 4853 648 5881 6182 4128 1679 4939 2646 652 340 7328 1320 900 1460 619 5505 2376 4853 3272 3750 4853 4109 3630 6902 3362 2810 3750 803 1985 4128 669 19 6508 900 1635 1871 7377 6122 6017 3750 2289 1099 3938 1571 7509 1375 5393 5589 5037 2115 4707 5310 6811 6093 900 7399 2410 1219 6654 3263 6017 3750 5998 4939 5971 4148 3750 803 1985 7194 4780 796 6038 4231 648 1722 6407 3750 1099 6485 1920 1767 5915 6518 6093 5598 5648 4280 900 7326 6242 5328 1214 3870 1985 7194 5998 5741 2115 913 5950 3800 1538 686 6734 6017 3750 1985 3659 1324 5814 4998 5176 535 7399 307 4068 486 1667 1099 2121 6407 3750 7420 3099 6038 4231 4190 1519 3255 7123 4305 3231 1635 4822 1722 3750 2967 3731 1757 1939 648 473 6518 2400 2614 5330 5530 1394 4939 1903 7495 7239 900 4469 5530 4704 299 7467 2121 669 5693 3750 3618 299 5264 4853 1734 316 2828 5445 4190 4939 3484 6043 2376 1031 761 900 5370 3782 2210 669 2210 3099 1363 6301 3508 1907 2410 7509 5718 541 3750 803 2967 6758 3038 6641 1985 7194 512 4811 6811 5243 2112 3750 1734 2376 2891 1211 648 7257 4148 7159 1667 3750 5816 4202 2400 5864 3915 7399 3414 1667 5977 7327 7256 2935 4936 1667 2151 900 6831 4599 6182 3227 3859 3099 7509 7256 3750 1985 7194 4128 4691 2029 1344 6630 5598 1465 648 3706 7403 543 3038 900 1985 7194 3800 980 6017 980 4124 648 900 1635 3605 5028 3731 4109 3792 1866 3578 3915 648 4939 1335 6666 6560 3750 3618 3508 1907 2410 1913 6656 3750 2828 4704 4998 4939 7039 3915 4167 5338 3750 803 1985 4939 3263 7123 264 2456 5689 2109 648 3750 6093 1699 5589 4411 1866 4750 648 1667 1099 3000 7420 1279 2975 1141 7148 3750 1985 3915 2570 4936 5998 1877 3000 7420 900 1635 5470 2313 5864 641 4333 3750 3915 5659 316 2828 2770 5176 803 2047 7532 606 6980 1635 3750 803 1750 7039 3800 7245 3099 7509 5839 3750 1866 1401 4321 5788 1519 6122 6405 4939 5998 2729 900 1985 7194 5998 2289 2107 1519 1592 316 2828 1679 4811 5461 3324 4525 4052 3750 2212 742 3750 1985 7194 6631 1335 5445 3750 1465 7194 4128 6887 4819 5977 3223 2717 900 5612 5948 3750 1985 7194 2289 913 3800 4811 6122 2614 2047 7532 606 6980 900 1985 2541 4409 3772 6012 1833 5560 4173 6662 414 340 316 4125 4128 3800 669 6575 4819 5977 900 1635 25 1460 619 7044 4921 648 4407 3800 1241 600 3750 5470 2313 641 4333 7539 803 316 4125 648 3530 6637 569 1985 3000 4659 5610 6917 3750 3618 1985 6887 7010 3870 900 3915 4939 7010 3870 5598 1985 1394 3397 5598 900 1635 1460 619 5708 1335 6518 4148 3750 2410 1219 6654 2252 1702 5598 803 4646 2109 6905 5520 1635 2663 885 5491 1465 4822 1722 5011 2376 4149 1903 2662 3750 803 316 2828 1767 5915 6065 2042 1335 5598 3750 2688 5598 3231 5780 7399 3750 4811 5788 1292 1641 1667 1099 4811 5393 6407 5708 6631 1335 6666 900 316 4125 4811 648 4939 6678 3750 2021 1726 340 4469 4842 4128 669 5393 4801 3154 3750 5780 7399 669 3915 544 62 5602 1913 5598 3750 3859 6759 4939 4646 1913 900 1635 1767 5915 6065 4464 5814 648 2410 1219 6654 1815 1699 6038 4231 5698 1375 62 307 3750 803 299 5264 1460 316 2828 5445 3750 1985 3414 1667 7509 3223 3750 5998 4939 669 2364 2975 648 900 1985 3038 5938 5168 3770 1667 3750 2717 368 5693 7117 3750 1985 2131 6909 2192 1141 6831 6015 900 3864 7194 1375 5393 1815 1699 1985 5780 7399 5681 3099 5176 3870 5598 3750 1985 3038 3771 6630 7159 1667 900 1635 5659 7377 3166 5445 3750 1793 6666 648 2614 5736 5537 5526 4128 6887 4811 495 6386 900 1465 7194 1767 5659 2410 1219 6654 340 1362 1829 2304 3193 6822 3750 5330 5264 4321 3750 4173 5619 4109 6227 648 5915 6515 4893 5957 6043 3750 5949 4411 5410 1991 4128 826 2490 3193 2602 3750 803 1985 7194 4516 5264 1394 3800 5659 3731 4109 3792 5081 2918 3750 5051 1985 5612 19 3750 3731 4109 3792 5718 7239 3193 6822 900 1635 7377 5736 3750 2205 7305 2620 2042 5192 1745 3605 6887 5278 299 648 5651 7440 1656 3630 1702 3300 7539 803 1985 340 3731 4109 3792 4190 4811 4464 1519 5778 3166 3750 1985 3038 6235 7399 5998 2313 900 1635 25 910 619 4939 1613 248 3193 4741 4893 3750 2967 3731 1757 1939 648 7495 5028 5949 4939 7539 803 4811 2255 3915 3750 1394 4741 900 6887 2255 3915 3750 1394 669 4741 900 1635'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train['text'][0]#都已经变成了lableEncoder"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(train['text'][0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "6\n",
      "7\n",
      "5\n",
      "8\n",
      " \n",
      "3\n",
      "3\n",
      "9\n",
      " \n",
      "2\n",
      "0\n",
      "2\n",
      "1\n",
      " \n",
      "1\n",
      "8\n",
      "5\n",
      "4\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "9\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "2\n",
      "0\n",
      "5\n",
      "8\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "2\n",
      " \n",
      "2\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "4\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "9\n",
      " \n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "2\n",
      "4\n",
      "5\n",
      "6\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "1\n",
      "2\n",
      "9\n",
      "2\n",
      " \n",
      "2\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "5\n",
      " \n",
      "5\n",
      "5\n",
      "2\n",
      "0\n",
      " \n",
      "7\n",
      "0\n",
      "5\n",
      "8\n",
      " \n",
      "6\n",
      "0\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "6\n",
      "3\n",
      "4\n",
      " \n",
      "6\n",
      "5\n",
      "9\n",
      "1\n",
      " \n",
      "3\n",
      "5\n",
      "3\n",
      "0\n",
      " \n",
      "6\n",
      "5\n",
      "0\n",
      "8\n",
      " \n",
      "2\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "7\n",
      "0\n",
      "4\n",
      "4\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "3\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "2\n",
      "0\n",
      "7\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "6\n",
      "8\n",
      "3\n",
      "1\n",
      " \n",
      "2\n",
      "6\n",
      "1\n",
      "4\n",
      " \n",
      "3\n",
      "3\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "2\n",
      "6\n",
      "9\n",
      " \n",
      "3\n",
      "3\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "8\n",
      "6\n",
      " \n",
      "5\n",
      "7\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      "5\n",
      " \n",
      "2\n",
      "4\n",
      "6\n",
      "6\n",
      " \n",
      "6\n",
      "8\n",
      "3\n",
      "1\n",
      " \n",
      "6\n",
      "7\n",
      "5\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "4\n",
      "3\n",
      " \n",
      "3\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "1\n",
      "7\n",
      "2\n",
      "6\n",
      " \n",
      "2\n",
      "3\n",
      "1\n",
      "3\n",
      " \n",
      "5\n",
      "9\n",
      "0\n",
      "6\n",
      " \n",
      "8\n",
      "2\n",
      "6\n",
      " \n",
      "4\n",
      "5\n",
      "1\n",
      "6\n",
      " \n",
      "6\n",
      "5\n",
      "7\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "8\n",
      "7\n",
      "1\n",
      " \n",
      "7\n",
      "0\n",
      "4\n",
      "4\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "7\n",
      "5\n",
      "7\n",
      " \n",
      "1\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "4\n",
      "7\n",
      "0\n",
      "4\n",
      " \n",
      "7\n",
      "0\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "0\n",
      "6\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "9\n",
      "6\n",
      "5\n",
      " \n",
      "2\n",
      "4\n",
      "9\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "4\n",
      "3\n",
      " \n",
      "2\n",
      "1\n",
      "4\n",
      "5\n",
      " \n",
      "2\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "7\n",
      "4\n",
      "5\n",
      "1\n",
      " \n",
      "3\n",
      "7\n",
      "7\n",
      "5\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "7\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "4\n",
      "1\n",
      " \n",
      "2\n",
      "9\n",
      "9\n",
      " \n",
      "4\n",
      "7\n",
      "0\n",
      "4\n",
      " \n",
      "2\n",
      "6\n",
      "2\n",
      "1\n",
      " \n",
      "7\n",
      "0\n",
      "2\n",
      "9\n",
      " \n",
      "3\n",
      "0\n",
      "5\n",
      "6\n",
      " \n",
      "6\n",
      "3\n",
      "3\n",
      "3\n",
      " \n",
      "4\n",
      "3\n",
      "3\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "2\n",
      "2\n",
      "8\n",
      "9\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "0\n",
      " \n",
      "2\n",
      "2\n",
      "0\n",
      " \n",
      "7\n",
      "0\n",
      "4\n",
      "4\n",
      " \n",
      "1\n",
      "2\n",
      "7\n",
      "9\n",
      " \n",
      "7\n",
      "4\n",
      "2\n",
      "6\n",
      " \n",
      "4\n",
      "2\n",
      "6\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "6\n",
      "7\n",
      "5\n",
      "8\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "1\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "2\n",
      "2\n",
      "0\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "0\n",
      "5\n",
      " \n",
      "2\n",
      "6\n",
      "2\n",
      "0\n",
      " \n",
      "5\n",
      "9\n",
      "7\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "3\n",
      "2\n",
      "9\n",
      " \n",
      "1\n",
      "7\n",
      "9\n",
      "3\n",
      " \n",
      "6\n",
      "6\n",
      "6\n",
      "6\n",
      " \n",
      "2\n",
      "0\n",
      "4\n",
      "2\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "9\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "7\n",
      "0\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "0\n",
      "6\n",
      " \n",
      "2\n",
      "4\n",
      "4\n",
      "6\n",
      " \n",
      "5\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "4\n",
      " \n",
      "2\n",
      "0\n",
      "5\n",
      "8\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "2\n",
      " \n",
      "2\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "2\n",
      "2\n",
      "5\n",
      "2\n",
      " \n",
      "5\n",
      "6\n",
      "4\n",
      "9\n",
      " \n",
      "2\n",
      "2\n",
      "1\n",
      "2\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "7\n",
      "2\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "3\n",
      "1\n",
      "0\n",
      " \n",
      "4\n",
      "5\n",
      "2\n",
      "5\n",
      " \n",
      "2\n",
      "4\n",
      "0\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "7\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "5\n",
      " \n",
      "7\n",
      "0\n",
      "4\n",
      "4\n",
      " \n",
      "4\n",
      "9\n",
      "2\n",
      "1\n",
      " \n",
      "2\n",
      "6\n",
      "5\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "7\n",
      " \n",
      "4\n",
      "6\n",
      "9\n",
      "9\n",
      " \n",
      "1\n",
      "6\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "7\n",
      "1\n",
      " \n",
      "1\n",
      "2\n",
      "7\n",
      "1\n",
      " \n",
      "4\n",
      "7\n",
      "4\n",
      "1\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "4\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "3\n",
      "8\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "0\n",
      "3\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "3\n",
      "3\n",
      "8\n",
      " \n",
      "2\n",
      "5\n",
      " \n",
      "3\n",
      "4\n",
      "6\n",
      "6\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "9\n",
      " \n",
      "4\n",
      "4\n",
      "1\n",
      "7\n",
      " \n",
      "1\n",
      "8\n",
      "5\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "9\n",
      "3\n",
      "8\n",
      " \n",
      "1\n",
      "5\n",
      "7\n",
      "1\n",
      " \n",
      "8\n",
      "4\n",
      "8\n",
      " \n",
      "6\n",
      "9\n",
      "8\n",
      "6\n",
      " \n",
      "8\n",
      "2\n",
      "7\n",
      " \n",
      "2\n",
      "1\n",
      "2\n",
      "4\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "9\n",
      "1\n",
      " \n",
      "7\n",
      "4\n",
      "4\n",
      "4\n",
      " \n",
      "7\n",
      "0\n",
      "3\n",
      "7\n",
      " \n",
      "2\n",
      "7\n",
      "2\n",
      "9\n",
      " \n",
      "9\n",
      "0\n",
      "8\n",
      " \n",
      "6\n",
      "3\n",
      "0\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "8\n",
      "8\n",
      "9\n",
      " \n",
      "6\n",
      "8\n",
      "1\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "9\n",
      "0\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "2\n",
      "2\n",
      "8\n",
      "9\n",
      " \n",
      "2\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "6\n",
      "8\n",
      "3\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "2\n",
      "4\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "5\n",
      "1\n",
      "7\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "2\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "7\n",
      "9\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "4\n",
      "8\n",
      "5\n",
      "3\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "2\n",
      " \n",
      "6\n",
      "1\n",
      "2\n",
      "2\n",
      " \n",
      "1\n",
      "9\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "7\n",
      "3\n",
      "6\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "2\n",
      "6\n",
      "0\n",
      "2\n",
      " \n",
      "6\n",
      "8\n",
      "2\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "4\n",
      "2\n",
      "6\n",
      "5\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      " \n",
      "7\n",
      "2\n",
      "9\n",
      " \n",
      "4\n",
      "4\n",
      "4\n",
      "8\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "1\n",
      "4\n",
      "0\n",
      "1\n",
      " \n",
      "4\n",
      "8\n",
      "5\n",
      "3\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "5\n",
      "8\n",
      "8\n",
      "1\n",
      " \n",
      "6\n",
      "1\n",
      "8\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "7\n",
      "9\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "2\n",
      "6\n",
      "4\n",
      "6\n",
      " \n",
      "6\n",
      "5\n",
      "2\n",
      " \n",
      "3\n",
      "4\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "3\n",
      "2\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "0\n",
      " \n",
      "6\n",
      "1\n",
      "9\n",
      " \n",
      "5\n",
      "5\n",
      "0\n",
      "5\n",
      " \n",
      "2\n",
      "3\n",
      "7\n",
      "6\n",
      " \n",
      "4\n",
      "8\n",
      "5\n",
      "3\n",
      " \n",
      "3\n",
      "2\n",
      "7\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "4\n",
      "8\n",
      "5\n",
      "3\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "2\n",
      " \n",
      "3\n",
      "3\n",
      "6\n",
      "2\n",
      " \n",
      "2\n",
      "8\n",
      "1\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "5\n",
      "0\n",
      "8\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "1\n",
      "8\n",
      "7\n",
      "1\n",
      " \n",
      "7\n",
      "3\n",
      "7\n",
      "7\n",
      " \n",
      "6\n",
      "1\n",
      "2\n",
      "2\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "2\n",
      "8\n",
      "9\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "9\n",
      "3\n",
      "8\n",
      " \n",
      "1\n",
      "5\n",
      "7\n",
      "1\n",
      " \n",
      "7\n",
      "5\n",
      "0\n",
      "9\n",
      " \n",
      "1\n",
      "3\n",
      "7\n",
      "5\n",
      " \n",
      "5\n",
      "3\n",
      "9\n",
      "3\n",
      " \n",
      "5\n",
      "5\n",
      "8\n",
      "9\n",
      " \n",
      "5\n",
      "0\n",
      "3\n",
      "7\n",
      " \n",
      "2\n",
      "1\n",
      "1\n",
      "5\n",
      " \n",
      "4\n",
      "7\n",
      "0\n",
      "7\n",
      " \n",
      "5\n",
      "3\n",
      "1\n",
      "0\n",
      " \n",
      "6\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "6\n",
      "0\n",
      "9\n",
      "3\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "4\n",
      " \n",
      "3\n",
      "2\n",
      "6\n",
      "3\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "5\n",
      "9\n",
      "7\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "7\n",
      "8\n",
      "0\n",
      " \n",
      "7\n",
      "9\n",
      "6\n",
      " \n",
      "6\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "4\n",
      "2\n",
      "3\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "1\n",
      "7\n",
      "2\n",
      "2\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      "5\n",
      " \n",
      "1\n",
      "9\n",
      "2\n",
      "0\n",
      " \n",
      "1\n",
      "7\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "6\n",
      "5\n",
      "1\n",
      "8\n",
      " \n",
      "6\n",
      "0\n",
      "9\n",
      "3\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "5\n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "2\n",
      "8\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "2\n",
      "6\n",
      " \n",
      "6\n",
      "2\n",
      "4\n",
      "2\n",
      " \n",
      "5\n",
      "3\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "4\n",
      " \n",
      "3\n",
      "8\n",
      "7\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "5\n",
      "7\n",
      "4\n",
      "1\n",
      " \n",
      "2\n",
      "1\n",
      "1\n",
      "5\n",
      " \n",
      "9\n",
      "1\n",
      "3\n",
      " \n",
      "5\n",
      "9\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "5\n",
      "3\n",
      "8\n",
      " \n",
      "6\n",
      "8\n",
      "6\n",
      " \n",
      "6\n",
      "7\n",
      "3\n",
      "4\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "1\n",
      "3\n",
      "2\n",
      "4\n",
      " \n",
      "5\n",
      "8\n",
      "1\n",
      "4\n",
      " \n",
      "4\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "5\n",
      "1\n",
      "7\n",
      "6\n",
      " \n",
      "5\n",
      "3\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "0\n",
      "7\n",
      " \n",
      "4\n",
      "0\n",
      "6\n",
      "8\n",
      " \n",
      "4\n",
      "8\n",
      "6\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "2\n",
      "1\n",
      "2\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "7\n",
      "4\n",
      "2\n",
      "0\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "4\n",
      "2\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "9\n",
      "0\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "3\n",
      "2\n",
      "5\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "2\n",
      "3\n",
      " \n",
      "4\n",
      "3\n",
      "0\n",
      "5\n",
      " \n",
      "3\n",
      "2\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "4\n",
      "8\n",
      "2\n",
      "2\n",
      " \n",
      "1\n",
      "7\n",
      "2\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "7\n",
      "5\n",
      "7\n",
      " \n",
      "1\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "7\n",
      "3\n",
      " \n",
      "6\n",
      "5\n",
      "1\n",
      "8\n",
      " \n",
      "2\n",
      "4\n",
      "0\n",
      "0\n",
      " \n",
      "2\n",
      "6\n",
      "1\n",
      "4\n",
      " \n",
      "5\n",
      "3\n",
      "3\n",
      "0\n",
      " \n",
      "5\n",
      "5\n",
      "3\n",
      "0\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "1\n",
      "9\n",
      "0\n",
      "3\n",
      " \n",
      "7\n",
      "4\n",
      "9\n",
      "5\n",
      " \n",
      "7\n",
      "2\n",
      "3\n",
      "9\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "4\n",
      "4\n",
      "6\n",
      "9\n",
      " \n",
      "5\n",
      "5\n",
      "3\n",
      "0\n",
      " \n",
      "4\n",
      "7\n",
      "0\n",
      "4\n",
      " \n",
      "2\n",
      "9\n",
      "9\n",
      " \n",
      "7\n",
      "4\n",
      "6\n",
      "7\n",
      " \n",
      "2\n",
      "1\n",
      "2\n",
      "1\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "5\n",
      "6\n",
      "9\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "6\n",
      "1\n",
      "8\n",
      " \n",
      "2\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "4\n",
      "8\n",
      "5\n",
      "3\n",
      " \n",
      "1\n",
      "7\n",
      "3\n",
      "4\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      "5\n",
      " \n",
      "4\n",
      "1\n",
      "9\n",
      "0\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "4\n",
      "8\n",
      "4\n",
      " \n",
      "6\n",
      "0\n",
      "4\n",
      "3\n",
      " \n",
      "2\n",
      "3\n",
      "7\n",
      "6\n",
      " \n",
      "1\n",
      "0\n",
      "3\n",
      "1\n",
      " \n",
      "7\n",
      "6\n",
      "1\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "3\n",
      "7\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "8\n",
      "2\n",
      " \n",
      "2\n",
      "2\n",
      "1\n",
      "0\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "2\n",
      "2\n",
      "1\n",
      "0\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "1\n",
      "3\n",
      "6\n",
      "3\n",
      " \n",
      "6\n",
      "3\n",
      "0\n",
      "1\n",
      " \n",
      "3\n",
      "5\n",
      "0\n",
      "8\n",
      " \n",
      "1\n",
      "9\n",
      "0\n",
      "7\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "7\n",
      "5\n",
      "0\n",
      "9\n",
      " \n",
      "5\n",
      "7\n",
      "1\n",
      "8\n",
      " \n",
      "5\n",
      "4\n",
      "1\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "6\n",
      "7\n",
      "5\n",
      "8\n",
      " \n",
      "3\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "6\n",
      "6\n",
      "4\n",
      "1\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "5\n",
      "1\n",
      "2\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "6\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "5\n",
      "2\n",
      "4\n",
      "3\n",
      " \n",
      "2\n",
      "1\n",
      "1\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "7\n",
      "3\n",
      "4\n",
      " \n",
      "2\n",
      "3\n",
      "7\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "9\n",
      "1\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "7\n",
      "2\n",
      "5\n",
      "7\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "8\n",
      " \n",
      "7\n",
      "1\n",
      "5\n",
      "9\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "8\n",
      "1\n",
      "6\n",
      " \n",
      "4\n",
      "2\n",
      "0\n",
      "2\n",
      " \n",
      "2\n",
      "4\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "8\n",
      "6\n",
      "4\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "4\n",
      "1\n",
      "4\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "9\n",
      "7\n",
      "7\n",
      " \n",
      "7\n",
      "3\n",
      "2\n",
      "7\n",
      " \n",
      "7\n",
      "2\n",
      "5\n",
      "6\n",
      " \n",
      "2\n",
      "9\n",
      "3\n",
      "5\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "6\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "2\n",
      "1\n",
      "5\n",
      "1\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "6\n",
      "8\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "5\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "1\n",
      "8\n",
      "2\n",
      " \n",
      "3\n",
      "2\n",
      "2\n",
      "7\n",
      " \n",
      "3\n",
      "8\n",
      "5\n",
      "9\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "7\n",
      "5\n",
      "0\n",
      "9\n",
      " \n",
      "7\n",
      "2\n",
      "5\n",
      "6\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "4\n",
      "6\n",
      "9\n",
      "1\n",
      " \n",
      "2\n",
      "0\n",
      "2\n",
      "9\n",
      " \n",
      "1\n",
      "3\n",
      "4\n",
      "4\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "0\n",
      "6\n",
      " \n",
      "7\n",
      "4\n",
      "0\n",
      "3\n",
      " \n",
      "5\n",
      "4\n",
      "3\n",
      " \n",
      "3\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "9\n",
      "8\n",
      "0\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "7\n",
      " \n",
      "9\n",
      "8\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "4\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "3\n",
      "6\n",
      "0\n",
      "5\n",
      " \n",
      "5\n",
      "0\n",
      "2\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "1\n",
      "8\n",
      "6\n",
      "6\n",
      " \n",
      "3\n",
      "5\n",
      "7\n",
      "8\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "1\n",
      "3\n",
      "3\n",
      "5\n",
      " \n",
      "6\n",
      "6\n",
      "6\n",
      "6\n",
      " \n",
      "6\n",
      "5\n",
      "6\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "6\n",
      "1\n",
      "8\n",
      " \n",
      "3\n",
      "5\n",
      "0\n",
      "8\n",
      " \n",
      "1\n",
      "9\n",
      "0\n",
      "7\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "1\n",
      "3\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "6\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "4\n",
      "7\n",
      "0\n",
      "4\n",
      " \n",
      "4\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "7\n",
      "0\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "4\n",
      "1\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "3\n",
      "3\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "2\n",
      "6\n",
      "3\n",
      " \n",
      "7\n",
      "1\n",
      "2\n",
      "3\n",
      " \n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "2\n",
      "4\n",
      "5\n",
      "6\n",
      " \n",
      "5\n",
      "6\n",
      "8\n",
      "9\n",
      " \n",
      "2\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "6\n",
      "0\n",
      "9\n",
      "3\n",
      " \n",
      "1\n",
      "6\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "5\n",
      "8\n",
      "9\n",
      " \n",
      "4\n",
      "4\n",
      "1\n",
      "1\n",
      " \n",
      "1\n",
      "8\n",
      "6\n",
      "6\n",
      " \n",
      "4\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "0\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "4\n",
      "2\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "7\n",
      "9\n",
      " \n",
      "2\n",
      "9\n",
      "7\n",
      "5\n",
      " \n",
      "1\n",
      "1\n",
      "4\n",
      "1\n",
      " \n",
      "7\n",
      "1\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "2\n",
      "5\n",
      "7\n",
      "0\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "6\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "1\n",
      "8\n",
      "7\n",
      "7\n",
      " \n",
      "3\n",
      "0\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "4\n",
      "2\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "5\n",
      "4\n",
      "7\n",
      "0\n",
      " \n",
      "2\n",
      "3\n",
      "1\n",
      "3\n",
      " \n",
      "5\n",
      "8\n",
      "6\n",
      "4\n",
      " \n",
      "6\n",
      "4\n",
      "1\n",
      " \n",
      "4\n",
      "3\n",
      "3\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "5\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "2\n",
      "7\n",
      "7\n",
      "0\n",
      " \n",
      "5\n",
      "1\n",
      "7\n",
      "6\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "2\n",
      "0\n",
      "4\n",
      "7\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "2\n",
      " \n",
      "6\n",
      "0\n",
      "6\n",
      " \n",
      "6\n",
      "9\n",
      "8\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "7\n",
      "0\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "2\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "7\n",
      "5\n",
      "0\n",
      "9\n",
      " \n",
      "5\n",
      "8\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "8\n",
      "6\n",
      "6\n",
      " \n",
      "1\n",
      "4\n",
      "0\n",
      "1\n",
      " \n",
      "4\n",
      "3\n",
      "2\n",
      "1\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "8\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "1\n",
      "2\n",
      "2\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "5\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "2\n",
      "7\n",
      "2\n",
      "9\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "2\n",
      "2\n",
      "8\n",
      "9\n",
      " \n",
      "2\n",
      "1\n",
      "0\n",
      "7\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "1\n",
      "5\n",
      "9\n",
      "2\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "6\n",
      "7\n",
      "9\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "5\n",
      "4\n",
      "6\n",
      "1\n",
      " \n",
      "3\n",
      "3\n",
      "2\n",
      "4\n",
      " \n",
      "4\n",
      "5\n",
      "2\n",
      "5\n",
      " \n",
      "4\n",
      "0\n",
      "5\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "2\n",
      "1\n",
      "2\n",
      " \n",
      "7\n",
      "4\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "3\n",
      "3\n",
      "5\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "6\n",
      "8\n",
      "8\n",
      "7\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "9\n",
      " \n",
      "5\n",
      "9\n",
      "7\n",
      "7\n",
      " \n",
      "3\n",
      "2\n",
      "2\n",
      "3\n",
      " \n",
      "2\n",
      "7\n",
      "1\n",
      "7\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "6\n",
      "1\n",
      "2\n",
      " \n",
      "5\n",
      "9\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "2\n",
      "2\n",
      "8\n",
      "9\n",
      " \n",
      "9\n",
      "1\n",
      "3\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "6\n",
      "1\n",
      "2\n",
      "2\n",
      " \n",
      "2\n",
      "6\n",
      "1\n",
      "4\n",
      " \n",
      "2\n",
      "0\n",
      "4\n",
      "7\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "2\n",
      " \n",
      "6\n",
      "0\n",
      "6\n",
      " \n",
      "6\n",
      "9\n",
      "8\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "2\n",
      "5\n",
      "4\n",
      "1\n",
      " \n",
      "4\n",
      "4\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "7\n",
      "2\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "2\n",
      " \n",
      "1\n",
      "8\n",
      "3\n",
      "3\n",
      " \n",
      "5\n",
      "5\n",
      "6\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "7\n",
      "3\n",
      " \n",
      "6\n",
      "6\n",
      "6\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      " \n",
      "3\n",
      "4\n",
      "0\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "5\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "6\n",
      "5\n",
      "7\n",
      "5\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "9\n",
      " \n",
      "5\n",
      "9\n",
      "7\n",
      "7\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "2\n",
      "5\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "0\n",
      " \n",
      "6\n",
      "1\n",
      "9\n",
      " \n",
      "7\n",
      "0\n",
      "4\n",
      "4\n",
      " \n",
      "4\n",
      "9\n",
      "2\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "4\n",
      "1\n",
      " \n",
      "6\n",
      "0\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "4\n",
      "7\n",
      "0\n",
      " \n",
      "2\n",
      "3\n",
      "1\n",
      "3\n",
      " \n",
      "6\n",
      "4\n",
      "1\n",
      " \n",
      "4\n",
      "3\n",
      "3\n",
      "3\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "9\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "5\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "5\n",
      "3\n",
      "0\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "7\n",
      " \n",
      "5\n",
      "6\n",
      "9\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "0\n",
      "0\n",
      "0\n",
      " \n",
      "4\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "5\n",
      "6\n",
      "1\n",
      "0\n",
      " \n",
      "6\n",
      "9\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "6\n",
      "1\n",
      "8\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "6\n",
      "8\n",
      "8\n",
      "7\n",
      " \n",
      "7\n",
      "0\n",
      "1\n",
      "0\n",
      " \n",
      "3\n",
      "8\n",
      "7\n",
      "0\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "7\n",
      "0\n",
      "1\n",
      "0\n",
      " \n",
      "3\n",
      "8\n",
      "7\n",
      "0\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "4\n",
      " \n",
      "3\n",
      "3\n",
      "9\n",
      "7\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "0\n",
      " \n",
      "6\n",
      "1\n",
      "9\n",
      " \n",
      "5\n",
      "7\n",
      "0\n",
      "8\n",
      " \n",
      "1\n",
      "3\n",
      "3\n",
      "5\n",
      " \n",
      "6\n",
      "5\n",
      "1\n",
      "8\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "4\n",
      " \n",
      "2\n",
      "2\n",
      "5\n",
      "2\n",
      " \n",
      "1\n",
      "7\n",
      "0\n",
      "2\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "4\n",
      "6\n",
      "4\n",
      "6\n",
      " \n",
      "2\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "5\n",
      " \n",
      "5\n",
      "5\n",
      "2\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "2\n",
      "6\n",
      "6\n",
      "3\n",
      " \n",
      "8\n",
      "8\n",
      "5\n",
      " \n",
      "5\n",
      "4\n",
      "9\n",
      "1\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "4\n",
      "8\n",
      "2\n",
      "2\n",
      " \n",
      "1\n",
      "7\n",
      "2\n",
      "2\n",
      " \n",
      "5\n",
      "0\n",
      "1\n",
      "1\n",
      " \n",
      "2\n",
      "3\n",
      "7\n",
      "6\n",
      " \n",
      "4\n",
      "1\n",
      "4\n",
      "9\n",
      " \n",
      "1\n",
      "9\n",
      "0\n",
      "3\n",
      " \n",
      "2\n",
      "6\n",
      "6\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "1\n",
      "7\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "6\n",
      "0\n",
      "6\n",
      "5\n",
      " \n",
      "2\n",
      "0\n",
      "4\n",
      "2\n",
      " \n",
      "1\n",
      "3\n",
      "3\n",
      "5\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "6\n",
      "8\n",
      "8\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "3\n",
      "2\n",
      "3\n",
      "1\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "8\n",
      " \n",
      "1\n",
      "2\n",
      "9\n",
      "2\n",
      " \n",
      "1\n",
      "6\n",
      "4\n",
      "1\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "1\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "5\n",
      "3\n",
      "9\n",
      "3\n",
      " \n",
      "6\n",
      "4\n",
      "0\n",
      "7\n",
      " \n",
      "5\n",
      "7\n",
      "0\n",
      "8\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "3\n",
      "3\n",
      "5\n",
      " \n",
      "6\n",
      "6\n",
      "6\n",
      "6\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "5\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "7\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "0\n",
      "2\n",
      "1\n",
      " \n",
      "1\n",
      "7\n",
      "2\n",
      "6\n",
      " \n",
      "3\n",
      "4\n",
      "0\n",
      " \n",
      "4\n",
      "4\n",
      "6\n",
      "9\n",
      " \n",
      "4\n",
      "8\n",
      "4\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "5\n",
      "3\n",
      "9\n",
      "3\n",
      " \n",
      "4\n",
      "8\n",
      "0\n",
      "1\n",
      " \n",
      "3\n",
      "1\n",
      "5\n",
      "4\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      " \n",
      "6\n",
      "2\n",
      " \n",
      "5\n",
      "6\n",
      "0\n",
      "2\n",
      " \n",
      "1\n",
      "9\n",
      "1\n",
      "3\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "8\n",
      "5\n",
      "9\n",
      " \n",
      "6\n",
      "7\n",
      "5\n",
      "9\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "4\n",
      "6\n",
      "4\n",
      "6\n",
      " \n",
      "1\n",
      "9\n",
      "1\n",
      "3\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "1\n",
      "7\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "6\n",
      "0\n",
      "6\n",
      "5\n",
      " \n",
      "4\n",
      "4\n",
      "6\n",
      "4\n",
      " \n",
      "5\n",
      "8\n",
      "1\n",
      "4\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "4\n",
      " \n",
      "1\n",
      "8\n",
      "1\n",
      "5\n",
      " \n",
      "1\n",
      "6\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "4\n",
      "2\n",
      "3\n",
      "1\n",
      " \n",
      "5\n",
      "6\n",
      "9\n",
      "8\n",
      " \n",
      "1\n",
      "3\n",
      "7\n",
      "5\n",
      " \n",
      "6\n",
      "2\n",
      " \n",
      "3\n",
      "0\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "2\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "0\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      " \n",
      "2\n",
      "8\n",
      "2\n",
      "8\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "4\n",
      "1\n",
      "4\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "7\n",
      "5\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "2\n",
      "2\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "2\n",
      "3\n",
      "6\n",
      "4\n",
      " \n",
      "2\n",
      "9\n",
      "7\n",
      "5\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "5\n",
      "9\n",
      "3\n",
      "8\n",
      " \n",
      "5\n",
      "1\n",
      "6\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "7\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "7\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "6\n",
      "8\n",
      " \n",
      "5\n",
      "6\n",
      "9\n",
      "3\n",
      " \n",
      "7\n",
      "1\n",
      "1\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "2\n",
      "1\n",
      "3\n",
      "1\n",
      " \n",
      "6\n",
      "9\n",
      "0\n",
      "9\n",
      " \n",
      "2\n",
      "1\n",
      "9\n",
      "2\n",
      " \n",
      "1\n",
      "1\n",
      "4\n",
      "1\n",
      " \n",
      "6\n",
      "8\n",
      "3\n",
      "1\n",
      " \n",
      "6\n",
      "0\n",
      "1\n",
      "5\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "3\n",
      "8\n",
      "6\n",
      "4\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "1\n",
      "3\n",
      "7\n",
      "5\n",
      " \n",
      "5\n",
      "3\n",
      "9\n",
      "3\n",
      " \n",
      "1\n",
      "8\n",
      "1\n",
      "5\n",
      " \n",
      "1\n",
      "6\n",
      "9\n",
      "9\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "5\n",
      "7\n",
      "8\n",
      "0\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "6\n",
      "8\n",
      "1\n",
      " \n",
      "3\n",
      "0\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "1\n",
      "7\n",
      "6\n",
      " \n",
      "3\n",
      "8\n",
      "7\n",
      "0\n",
      " \n",
      "5\n",
      "5\n",
      "9\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "7\n",
      "1\n",
      " \n",
      "6\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "7\n",
      "1\n",
      "5\n",
      "9\n",
      " \n",
      "1\n",
      "6\n",
      "6\n",
      "7\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "5\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "7\n",
      "3\n",
      "7\n",
      "7\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      "6\n",
      " \n",
      "5\n",
      "4\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "7\n",
      "9\n",
      "3\n",
      " \n",
      "6\n",
      "6\n",
      "6\n",
      "6\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "2\n",
      "6\n",
      "1\n",
      "4\n",
      " \n",
      "5\n",
      "7\n",
      "3\n",
      "6\n",
      " \n",
      "5\n",
      "5\n",
      "3\n",
      "7\n",
      " \n",
      "5\n",
      "5\n",
      "2\n",
      "6\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "6\n",
      "8\n",
      "8\n",
      "7\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "4\n",
      "9\n",
      "5\n",
      " \n",
      "6\n",
      "3\n",
      "8\n",
      "6\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "4\n",
      "6\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "1\n",
      "7\n",
      "6\n",
      "7\n",
      " \n",
      "5\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "2\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "2\n",
      "1\n",
      "9\n",
      " \n",
      "6\n",
      "6\n",
      "5\n",
      "4\n",
      " \n",
      "3\n",
      "4\n",
      "0\n",
      " \n",
      "1\n",
      "3\n",
      "6\n",
      "2\n",
      " \n",
      "1\n",
      "8\n",
      "2\n",
      "9\n",
      " \n",
      "2\n",
      "3\n",
      "0\n",
      "4\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "6\n",
      "8\n",
      "2\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "3\n",
      "3\n",
      "0\n",
      " \n",
      "5\n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "4\n",
      "3\n",
      "2\n",
      "1\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "4\n",
      "1\n",
      "7\n",
      "3\n",
      " \n",
      "5\n",
      "6\n",
      "1\n",
      "9\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "6\n",
      "2\n",
      "2\n",
      "7\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "5\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "6\n",
      "5\n",
      "1\n",
      "5\n",
      " \n",
      "4\n",
      "8\n",
      "9\n",
      "3\n",
      " \n",
      "5\n",
      "9\n",
      "5\n",
      "7\n",
      " \n",
      "6\n",
      "0\n",
      "4\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "9\n",
      "4\n",
      "9\n",
      " \n",
      "4\n",
      "4\n",
      "1\n",
      "1\n",
      " \n",
      "5\n",
      "4\n",
      "1\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "9\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "2\n",
      "8\n",
      " \n",
      "8\n",
      "2\n",
      "6\n",
      " \n",
      "2\n",
      "4\n",
      "9\n",
      "0\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "2\n",
      "6\n",
      "0\n",
      "2\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "7\n",
      "1\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "5\n",
      "1\n",
      "6\n",
      " \n",
      "5\n",
      "2\n",
      "6\n",
      "4\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "4\n",
      " \n",
      "3\n",
      "8\n",
      "0\n",
      "0\n",
      " \n",
      "5\n",
      "6\n",
      "5\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "5\n",
      "0\n",
      "8\n",
      "1\n",
      " \n",
      "2\n",
      "9\n",
      "1\n",
      "8\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "5\n",
      "0\n",
      "5\n",
      "1\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "5\n",
      "6\n",
      "1\n",
      "2\n",
      " \n",
      "1\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "5\n",
      "7\n",
      "1\n",
      "8\n",
      " \n",
      "7\n",
      "2\n",
      "3\n",
      "9\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "6\n",
      "8\n",
      "2\n",
      "2\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "7\n",
      "7\n",
      " \n",
      "5\n",
      "7\n",
      "3\n",
      "6\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "2\n",
      "0\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "0\n",
      "5\n",
      " \n",
      "2\n",
      "6\n",
      "2\n",
      "0\n",
      " \n",
      "2\n",
      "0\n",
      "4\n",
      "2\n",
      " \n",
      "5\n",
      "1\n",
      "9\n",
      "2\n",
      " \n",
      "1\n",
      "7\n",
      "4\n",
      "5\n",
      " \n",
      "3\n",
      "6\n",
      "0\n",
      "5\n",
      " \n",
      "6\n",
      "8\n",
      "8\n",
      "7\n",
      " \n",
      "5\n",
      "2\n",
      "7\n",
      "8\n",
      " \n",
      "2\n",
      "9\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "5\n",
      "6\n",
      "5\n",
      "1\n",
      " \n",
      "7\n",
      "4\n",
      "4\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "5\n",
      "6\n",
      " \n",
      "3\n",
      "6\n",
      "3\n",
      "0\n",
      " \n",
      "1\n",
      "7\n",
      "0\n",
      "2\n",
      " \n",
      "3\n",
      "3\n",
      "0\n",
      "0\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "9\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "4\n",
      "0\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "4\n",
      "1\n",
      "0\n",
      "9\n",
      " \n",
      "3\n",
      "7\n",
      "9\n",
      "2\n",
      " \n",
      "4\n",
      "1\n",
      "9\n",
      "0\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "4\n",
      "4\n",
      "6\n",
      "4\n",
      " \n",
      "1\n",
      "5\n",
      "1\n",
      "9\n",
      " \n",
      "5\n",
      "7\n",
      "7\n",
      "8\n",
      " \n",
      "3\n",
      "1\n",
      "6\n",
      "6\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "9\n",
      "8\n",
      "5\n",
      " \n",
      "3\n",
      "0\n",
      "3\n",
      "8\n",
      " \n",
      "6\n",
      "2\n",
      "3\n",
      "5\n",
      " \n",
      "7\n",
      "3\n",
      "9\n",
      "9\n",
      " \n",
      "5\n",
      "9\n",
      "9\n",
      "8\n",
      " \n",
      "2\n",
      "3\n",
      "1\n",
      "3\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n",
      " \n",
      "2\n",
      "5\n",
      " \n",
      "9\n",
      "1\n",
      "0\n",
      " \n",
      "6\n",
      "1\n",
      "9\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "1\n",
      "6\n",
      "1\n",
      "3\n",
      " \n",
      "2\n",
      "4\n",
      "8\n",
      " \n",
      "3\n",
      "1\n",
      "9\n",
      "3\n",
      " \n",
      "4\n",
      "7\n",
      "4\n",
      "1\n",
      " \n",
      "4\n",
      "8\n",
      "9\n",
      "3\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "2\n",
      "9\n",
      "6\n",
      "7\n",
      " \n",
      "3\n",
      "7\n",
      "3\n",
      "1\n",
      " \n",
      "1\n",
      "7\n",
      "5\n",
      "7\n",
      " \n",
      "1\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "6\n",
      "4\n",
      "8\n",
      " \n",
      "7\n",
      "4\n",
      "9\n",
      "5\n",
      " \n",
      "5\n",
      "0\n",
      "2\n",
      "8\n",
      " \n",
      "5\n",
      "9\n",
      "4\n",
      "9\n",
      " \n",
      "4\n",
      "9\n",
      "3\n",
      "9\n",
      " \n",
      "7\n",
      "5\n",
      "3\n",
      "9\n",
      " \n",
      "8\n",
      "0\n",
      "3\n",
      " \n",
      "4\n",
      "8\n",
      "1\n",
      "1\n",
      " \n",
      "2\n",
      "2\n",
      "5\n",
      "5\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "4\n",
      " \n",
      "4\n",
      "7\n",
      "4\n",
      "1\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "6\n",
      "8\n",
      "8\n",
      "7\n",
      " \n",
      "2\n",
      "2\n",
      "5\n",
      "5\n",
      " \n",
      "3\n",
      "9\n",
      "1\n",
      "5\n",
      " \n",
      "3\n",
      "7\n",
      "5\n",
      "0\n",
      " \n",
      "1\n",
      "3\n",
      "9\n",
      "4\n",
      " \n",
      "6\n",
      "6\n",
      "9\n",
      " \n",
      "4\n",
      "7\n",
      "4\n",
      "1\n",
      " \n",
      "9\n",
      "0\n",
      "0\n",
      " \n",
      "1\n",
      "6\n",
      "3\n",
      "5\n"
     ]
    }
   ],
   "source": [
    "for i in train['text'][0]:\n",
    "    print(i)#这里是字符串 连空格也算进去了 不过这里想统计一下句子的长度 所以应该是每个数字一组   统计的话 需要把字符串切分一下"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0         1057\n",
       "1          486\n",
       "2          764\n",
       "3         1570\n",
       "4          307\n",
       "          ... \n",
       "199995     868\n",
       "199996    1142\n",
       "199997    1180\n",
       "199998     179\n",
       "199999    2098\n",
       "Name: text_len, Length: 200000, dtype: int64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计一下句子的长度\n",
    "train['text_len']=train['text'].apply(lambda x:len(x.split(' ')))#split是把字符串分割之后 放在了一个List里面 统计list的长度 就OK了\n",
    "train['text_len']#这里就是得到了句子的长度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0         607\n",
       "1        1861\n",
       "2         901\n",
       "3        3786\n",
       "4         316\n",
       "         ... \n",
       "49995     275\n",
       "49996     858\n",
       "49997     299\n",
       "49998     470\n",
       "49999     245\n",
       "Name: text_len, Length: 50000, dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计一下句子的长度  这次是测试集\n",
    "test['text_len']=test['text'].apply(lambda x:len(x.split(' ')))#split是把字符串分割之后 放在了一个List里面 统计list的长度 就OK了\n",
    "test['text_len']#这里就是得到了句子的长度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    50000.000000\n",
       "mean       909.844960\n",
       "std       1032.313375\n",
       "min         14.000000\n",
       "25%        370.000000\n",
       "50%        676.000000\n",
       "75%       1133.000000\n",
       "max      41861.000000\n",
       "Name: text_len, dtype: float64"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#对句子的长度进行一下探索分析\n",
    "test['text_len'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "句子长度大于2000的有多少个:\t 15955\n"
     ]
    }
   ],
   "source": [
    "#计算一下句子超过2000的比例\n",
    "count=0\n",
    "#遍历text_len这一列\n",
    "for i in train['text_len']:#可以直接用for去遍历那一列\n",
    "    if i >2000:\n",
    "        count+=1\n",
    "print(\"句子长度大于2000的有多少个:\\t\",count)#有15955个"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.079775"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#可以看下占比是多少\n",
    "count/len(train['text_len'])#这个占比是比较少的 大约在8%  所以大部分的句子的长度都是在2000以内"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     38918\n",
       "1     36945\n",
       "2     31425\n",
       "3     22133\n",
       "4     15016\n",
       "5     12232\n",
       "6      9985\n",
       "7      8841\n",
       "8      7847\n",
       "9      5878\n",
       "10     4920\n",
       "11     3131\n",
       "12     1821\n",
       "13      908\n",
       "Name: label, dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#同样这里可以探索一下label的分布情况\n",
    "train['label'].value_counts()#这里是一共有14个分类 刚好是0-14的排列 数量的多少  可以做一下数据的可视化 看看分布情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD2CAYAAADfy1DXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQmElEQVR4nO3df6zddX3H8efLAkttmRa5qXZZbcw6lzmoxhsEVqAQmoHoFpgJS1QS0XRzxGUmS6yBuGB04mLImAimGzNEHRnR6JzAGB0w6zoW2hgm2zBusWVUyeoCvakhTvG9P86X9VIr53vP/fG918/zkZz0e97ne855f9ue+7qf7+f7/Z5UFZKk9rxo6AYkScMwACSpUQaAJDXKAJCkRhkAktSok4Zu4IWcfvrptWnTpqHbkKQVZf/+/d+tqqlx6y3rANi0aRP79u0bug1JWlGSHOyznruAJKlRvQIgyfokX+uWb0uyN8l1sx6fuCZJGkbfEcDHgNVJrgBWVdW5wIYkm+dTW4wNkiT1MzYAklwEfA94EtgG3Nk9dD+wdZ61E73fjiT7kuw7fPjwXLZFkjQHLxgASU4BPgDs7EprgEPd8gywfp61H1NVu6pquqqmp6bGTmJLkiY0bgSwE/hEVT3d3T8KrO6W13bPn09NkjSQcT+ELwauSfIg8FrgzRzbdbMFOADsn0dNkjSQFzwPoKrOf265C4FfB/Yk2QBcCpwN1DxqkqSB9N4NU1XbqmqG0WTuQ8CFVXVkPrWF3BBJ0tzM+UzgqnqKY0fzzLu2mDbtvGver3HghssWoBNJWn6ciJWkRhkAktQoA0CSGmUASFKjDABJapQBIEmNMgAkqVEGgCQ1ygCQpEYt6+8EXq48w1jSTwNHAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlRvQIgyWlJtic5fbEbkiQtjbEBkOQVwF3AWcADSaaSPJ7kwe52Rrfe9UkeTnLzrOf2qkmSll6fEcBrgPdW1YeBe4GrgTu67wjeVlVfTzINbGUUEk8kubhvbTE2SpI03tgAqKrdVfVQkvMZ/eB+Brg8yVeTfDbJScD5wOerqoDdwHlzqEmSBtB3DiDAlcAPgEeAC6pqK/A08EZgDXCoW30GWD+H2vHvtSPJviT7Dh8+PMEmSZL66BUANXINsBd4eVV9p3voMWAzcBRY3dXWdq/bt3b8e+2qqumqmp6ampr7FkmSeukzCfy+JFd1d18KfDLJliSrgMsZjQj2M9q3D7AFODCHmiRpAH2uBroLuDPJu4BHGe3H/ywQ4EtVtTvJi4CPJLkJuKS7HexZkyQNYGwAVNVTwPbjymcet86PuiN6LgNuqqpvAfStSZKW3oJ9H0BVPQN8bpKaJGnpeSkISWqUASBJjTIAJKlRBoAkNcoAkKRGGQCS1CgDQJIaZQBIUqMMAElqlAEgSY0yACSpUQaAJDXKAJCkRi3Y1UA1f5t23jXv1zhww2UL0ImkFjgCkKRGGQCS1CgDQJIa1SsAkpyWZHuS0xe7IUnS0hgbAEleAdwFnAU8kGQqyW1J9ia5btZ6E9ckSUuvzwjgNcB7q+rDwL3ARcCqqjoX2JBkc5IrJq0tzmZJksYZexhoVe0GSHI+o1HAacCd3cP3A1uB182j9s3Z75dkB7ADYOPGjRNskiSpj75zAAGuBH4ABDjUPTQDrAfWzKP2PFW1q6qmq2p6ampqrtsjSeqpVwDUyDXAXuBsYHX30NruNY7OoyZJGkCfSeD3Jbmqu/tS4AZGu24AtgAHgP3zqEmSBtDnUhC7gDuTvAt4FPgi8JUkG4BLGY0ICtgzYU2SNICxI4CqeqqqtlfV+VX1u1V1BNgGPARcWFVHqmpm0tpibJQkabyJLgZXVU9x7GieedckSUvPSVhJapQBIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlRBoAkNcoAkKRGGQCS1CgDQJIaZQBIUqMMAElqlAEgSY0aGwBJXpLkniT3JflCklOSPJ7kwe52Rrfe9UkeTnLzrOf2qkmSll6fEcBbgRurajvwJLATuKOqtnW3ryeZBrYCZwFPJLm4b20xNkqSNN7YAKiqW6rqvu7uFPBD4PIkX03y2SQnAecDn6+qAnYD582h9jxJdiTZl2Tf4cOHF2ATJUkn0nsOIMk5wDrgPuCCqtoKPA28EVgDHOpWnQHWz6H2PFW1q6qmq2p6ampqrtsjSerppD4rJTkN+Djwm8CTVfX97qHHgM3AUWB1V1vLKFj61iRJA+gzCXwKcCfw/qo6CHw6yZYkq4DLgUeA/Yz27QNsAQ7MoSZJGkCfEcA7gdcD1ya5FngA+DQQ4EtVtTvJi4CPJLkJuKS7HexZkyQNYGwAVNWtwK3Hla8/bp0fdUf0XAbcVFXfAuhbkyQtvV5zAH1U1TPA5yapSZKWnpOwktQoA0CSGmUASFKjDABJapQBIEmNMgAkqVEGgCQ1ygCQpEYt2IlgWr427bxr3q9x4IbLFqATScuJIwBJapQBIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhplAEhSo/p8KfxLktyT5L4kX0hySpLbkuxNct2s9SauSZKWXp8RwFuBG6tqO/Ak8FvAqqo6F9iQZHOSKyatLc5mSZLG6fOl8LfMujsFvA34k+7+/cBW4HXAnRPWvjn7/ZLsAHYAbNy4cS7bIkmag95zAEnOAdYB/wUc6sozwHpgzTxqz1NVu6pquqqmp6am5rQxkqT+egVAktOAjwNXA0eB1d1Da7vXmE9NkjSAPpPApzDabfP+qjoI7Ge06wZgC3BgnjVJ0gD6XA76ncDrgWuTXAt8Cnh7kg3ApcDZQAF7JqxJkgYwdgRQVbdW1bqq2tbdbge2AQ8BF1bVkaqambS2GBslSRpvoi+EqaqnOHY0z7xrkqSl5ySsJDXKAJCkRhkAktQoA0CSGmUASFKjDABJapQBIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlRBoAkNcoAkKRG9QqAJOuT7OmWfy7JE0ke7G5TXf22JHuTXDfreb1qkqSlNzYAkqwDbgfWdKU3AB+e9SXxh5NcAayqqnOBDUk2960tzmZJksbp86XwzwJXAn/d3T8buDTJVcBDVfVeYBvHvuj9fmAr8LqetW/OfrMkO4AdABs3bpzzBmnpbNp517xf48ANly1AJ5ImMXYEUFUzVXVkVuke4NyqOgf4xSRnMhodHOoenwHWz6F2/PvtqqrpqpqempqaYJMkSX30GQEcb29Vfb9bfgzYDBwFVne1tYyCpW9NkjSASX4A35vkFUleDPwa8Ciwn9HuHIAtwIE51CRJA5hkBHA98ADwv8Anq+obSb4D7EmyAbiU0TxB9axJkgbQewRQVdu6Px+oql+qqjOr6uauNsNoIvgh4MKqOtK3toDbIkmag0lGACdUVU9x7AifOdUkSUvPSVhJapQBIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhplAEhSoxbsRDBpoXiZaWlpOAKQpEYZAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlRBoAkNapXACRZn2RPt3xyki8n2Zvk6vnWJEnDGBsASdYBtwNrutJ7gH1VdS7wpiSnzrMmSRpAnxHAs8CVwEx3fxvHvtN3LzA9z5okaQBjrwVUVTMASZ4rrQEOdcszwPp51p4nyQ5gB8DGjRvnsi3SC1qIawyB1xnST49JJoGPAqu75bXda8yn9jxVtauqpqtqempqaoL2JEl9TBIA+4Gt3fIW4MA8a5KkAUxyOejbgbuTnAf8MvDPjHbrTFqTJA2g9wigqrZ1fx4EtgP/CFxcVc/Op7agWyNJ6m2iL4Spqm9z7GieedckSUvPbwST5smji7RSeSkISWqUASBJjTIAJKlRBoAkNcpJYGmZcnJZi80RgCQ1ygCQpEYZAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlRBoAkNcoAkKRGeSkIqTFeYkLPcQQgSY2acwAkOSnJ40ke7G5nJLk+ycNJbp61Xq+aJGkYk4wAzgTuqKpt3RfF/wywFTgLeCLJxUmm+9QWZAskSROZZA7gbODyJL8KHAQeAT5fVZVkN/Bm4EjP2u7jXzzJDmAHwMaNGyfZJklSD5MEwMPABVX1nSSfAFYD3+gemwHWAz8E/rNH7cdU1S5gF8D09HRN0J+kATi5vPJMEgD/UlXf75YfA05hFAIAaxntVjrasyZJGsgkP4Q/nWRLklXA5cAaRvv2AbYAB4D9PWuSpIFMMgL4IPCXQIAvAR8C9iS5Cbikux0EPtKjJkkayJwDoKoeZXQk0P/rjui5DLipqr41l5okaRgLciZwVT0DfG6SmiRpGE7ESlKjDABJapQBIEmN8mqgkpY1TzBbPI4AJKlRBoAkNcoAkKRGGQCS1CgDQJIaZQBIUqM8DFRSkzy81BGAJDXLAJCkRhkAktQoA0CSGuUksCQtoJU0uewIQJIaZQBIUqMGCYAktyXZm+S6Id5fkjRAACS5AlhVVecCG5JsXuoeJEmQqlraN0z+FPjbqro7yVuAU6vqU7Me3wHs6O6+GvjGIrZzOvDdRXz9hbbS+oWV17P9Li77XVzP9fvKqpoat/IQRwGtAQ51yzPAL8x+sKp2AbuWopEk+6pqeineayGstH5h5fVsv4vLfhfXXPsdYg7gKLC6W147UA+S1LwhfvjuB7Z2y1uAAwP0IEnNG2IX0BeBPUk2AJcCZw/Qw3OWZFfTAlpp/cLK69l+F5f9Lq459bvkk8AASdYB24GvVNWTS96AJGmYAJAkDc8JWElqVLMBsJLORk7ykiT3JLkvyReSnDJ0T30kWZ/ka0P3MRdJbkny5qH7GCfJuiR3J9mT5JND9/NCuv8He7rlk5N8ufvsXT10bydyXL8bkzyY5P4ku5Jk6P6ON7vfWbVfSfJ3457bZACswLOR3wrcWFXbgSeBSwbup6+PceyQ32UvyXnAy6vqb4bupYe3A5+pqvOAU5Msy2PVu/m+2xmd/wPwHmBf99l7U5JTB2vuBE7Q728D766qi4CfB84YqrcTOUG/dCF1IzD2F8UmAwDYBtzZLd/PscNSl6WquqWq7uvuTgH/PWQ/fSS5CPgeo8Ba9pKcDPwZcCDJbwzdTw//A7w6yUsZ/WB6fNh2fqJngSsZnfQJz//s7QWWW3A9r9+quraq/r177GUsv7OCj//7BXgH8ECfJ7caAMefjbx+wF56S3IOsK6qHhq6lxfS7aL6ALBz6F7m4Crg34A/Bs5K8p6B+xnnq8Bm4PeAx4Cnhm3nxKpqpqqOzCot68/eCfoFIMmVwL9W1bcHaOsnOr7fJC8D3sZo9D1WqwGw4s5GTnIa8HFgWe43Pc5O4BNV9fTQjczB64Bd3WHJnwEuHLifcf4I+J2q+iCjAHjHwP30tRI/e68C/gD4/YFb6eMG4P1V9YM+Ky/7v/xFsqLORu5+o76T0T/swaH76eFi4JokDwKvTfLnA/fTx38Ar+qWp4Hl/vf8YuCMJKuANwAr5XjulfbZWwfcAVx9opHBMnQB8NFZn70PvdDKTZ4HkORngT3A39Odjbyc/3GTvJvRb3yPdKVbq+qvBmyptyQPVtW2ofsYp5uM/AtGuyROBt5SVYde+FnDSXIW8CnglcA/AZdX1dFhu/rJnvt/kOSVwN3AbuBcRp+9Z4ft7sfN6vejjHYPPndV4j+sqn8YsLUTOtHnrM9nr8kAAM9GlobSXQZmK3Dvcv7FqwXNBoAkta7VOQBJap4BIEmNMgAkqVEGgCQ1ygCQpEb9Hz5IVYUvcFh4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "plt.bar(train['label'].value_counts().index,train['label'].value_counts().values)#横轴是标签的值 纵轴是标签的数量\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "程序已经开始运行了\n",
      "已经加载完了\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计一下字符的分布\n",
    "from collections import Counter\n",
    "print(\"程序已经开始运行了\")\n",
    "text=' '.join(train['text'])\n",
    "print(\"已经加载完了\")\n",
    "type(text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2967 6758 339 2021 1'"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "text[:20]#这里只打印了前一部分字符串 全部打印出来 是很费劲的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'str'> 20\n"
     ]
    }
   ],
   "source": [
    "print(type(text[:20]),len(text[:20]))#16个字符 还有4个空格 所以字符长度是20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "879587344"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(text)#这里的长度是8000多万  就是所有的数字和空格是8亿个"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('3750', 7482224),\n",
       " ('648', 4924890),\n",
       " ('900', 3262544),\n",
       " ('3370', 2020958),\n",
       " ('6122', 1602363),\n",
       " ('4464', 1544962),\n",
       " ('7399', 1455864),\n",
       " ('4939', 1387951),\n",
       " ('3659', 1251253),\n",
       " ('4811', 1159401),\n",
       " ('5598', 1121908),\n",
       " ('2465', 1087011),\n",
       " ('669', 1086645),\n",
       " ('2400', 1031116),\n",
       " ('5560', 1020573),\n",
       " ('299', 927955),\n",
       " ('2109', 921676),\n",
       " ('4893', 917183),\n",
       " ('4411', 884362),\n",
       " ('1699', 853028),\n",
       " ('1519', 805002),\n",
       " ('803', 786906),\n",
       " ('1635', 785260),\n",
       " ('6065', 753778),\n",
       " ('5998', 723615),\n",
       " ('1903', 689400),\n",
       " ('5445', 679277),\n",
       " ('1324', 666498),\n",
       " ('2376', 647118),\n",
       " ('340', 638801),\n",
       " ('4659', 629805),\n",
       " ('3800', 609360),\n",
       " ('5948', 606320),\n",
       " ('1460', 603450),\n",
       " ('1633', 595355),\n",
       " ('1985', 590549),\n",
       " ('6017', 574746),\n",
       " ('2614', 570863),\n",
       " ('3961', 563485),\n",
       " ('1465', 561794),\n",
       " ('5393', 559824),\n",
       " ('4853', 559247),\n",
       " ('2210', 555852),\n",
       " ('5602', 553860),\n",
       " ('6250', 551889),\n",
       " ('3700', 542192),\n",
       " ('5977', 540044),\n",
       " ('2799', 537723),\n",
       " ('4646', 527899),\n",
       " ('7539', 523090),\n",
       " ('4516', 514667),\n",
       " ('2252', 510391),\n",
       " ('7543', 507725),\n",
       " ('6357', 501814),\n",
       " ('151', 501337),\n",
       " ('619', 497850),\n",
       " ('3915', 495171),\n",
       " ('5410', 494533),\n",
       " ('913', 485476),\n",
       " ('7495', 484519),\n",
       " ('6093', 480245),\n",
       " ('5620', 475431),\n",
       " ('4128', 472731),\n",
       " ('5780', 458642),\n",
       " ('5915', 455030),\n",
       " ('7194', 453044),\n",
       " ('4149', 452545),\n",
       " ('3223', 452237),\n",
       " ('2073', 449518),\n",
       " ('307', 446750),\n",
       " ('1375', 446084),\n",
       " ('2662', 433000),\n",
       " ('2490', 432430),\n",
       " ('5491', 431619),\n",
       " ('4490', 419977),\n",
       " ('5296', 407396),\n",
       " ('5036', 407236),\n",
       " ('4269', 402128),\n",
       " ('2106', 397698),\n",
       " ('5858', 397652),\n",
       " ('5330', 395334),\n",
       " ('3686', 393374),\n",
       " ('1394', 391135),\n",
       " ('1667', 390210),\n",
       " ('6045', 381639),\n",
       " ('465', 380720),\n",
       " ('3099', 380157),\n",
       " ('5430', 377860),\n",
       " ('5176', 377806),\n",
       " ('1866', 365172),\n",
       " ('2539', 364718),\n",
       " ('25', 362892),\n",
       " ('4559', 355246),\n",
       " ('6038', 351022),\n",
       " ('192', 350851),\n",
       " ('4704', 350510),\n",
       " ('6248', 345247),\n",
       " ('1141', 345027),\n",
       " ('1080', 343589),\n",
       " ('3272', 340128),\n",
       " ('5028', 338984),\n",
       " ('1567', 335257),\n",
       " ('6831', 332620),\n",
       " ('4190', 330524),\n",
       " ('6104', 327208),\n",
       " ('3618', 323251),\n",
       " ('3374', 320501),\n",
       " ('7010', 317800),\n",
       " ('2859', 316659),\n",
       " ('1702', 316270),\n",
       " ('2119', 316223),\n",
       " ('3166', 316133),\n",
       " ('3530', 315586),\n",
       " ('3605', 313110),\n",
       " ('6407', 310518),\n",
       " ('4525', 310218),\n",
       " ('4822', 308838),\n",
       " ('1099', 304617),\n",
       " ('6644', 304229),\n",
       " ('5659', 301480),\n",
       " ('3772', 297996),\n",
       " ('7186', 296984),\n",
       " ('5589', 296551),\n",
       " ('5510', 296268),\n",
       " ('531', 293803),\n",
       " ('6637', 293073),\n",
       " ('1407', 290809),\n",
       " ('5619', 287664),\n",
       " ('2986', 287351),\n",
       " ('4480', 285033),\n",
       " ('3641', 281046),\n",
       " ('4063', 279843),\n",
       " ('1920', 278674),\n",
       " ('1906', 278587),\n",
       " ('1722', 277991),\n",
       " ('2515', 277727),\n",
       " ('23', 277281),\n",
       " ('5677', 274359),\n",
       " ('910', 274139),\n",
       " ('5778', 272303),\n",
       " ('5689', 271731),\n",
       " ('5736', 270036),\n",
       " ('4124', 268752),\n",
       " ('5011', 268466),\n",
       " ('4167', 267487),\n",
       " ('1070', 266582),\n",
       " ('5310', 265511),\n",
       " ('1767', 265143),\n",
       " ('2212', 264442),\n",
       " ('7377', 264393),\n",
       " ('5612', 262746),\n",
       " ('7509', 261605),\n",
       " ('1018', 261462),\n",
       " ('2595', 260471),\n",
       " ('1736', 259164),\n",
       " ('6835', 255389),\n",
       " ('3263', 254706),\n",
       " ('281', 254467),\n",
       " ('3809', 254454),\n",
       " ('5537', 252687),\n",
       " ('1363', 250747),\n",
       " ('1277', 246201),\n",
       " ('3893', 245613),\n",
       " ('3220', 245287),\n",
       " ('3743', 244430),\n",
       " ('2555', 242525),\n",
       " ('2541', 241370),\n",
       " ('4958', 241174),\n",
       " ('5566', 240933),\n",
       " ('6887', 240546),\n",
       " ('1871', 240055),\n",
       " ('2289', 238184),\n",
       " ('742', 238005),\n",
       " ('2107', 236284),\n",
       " ('2265', 235796),\n",
       " ('3300', 235677),\n",
       " ('4969', 234976),\n",
       " ('5949', 234859),\n",
       " ('2597', 234707),\n",
       " ('6040', 234379),\n",
       " ('6242', 232908),\n",
       " ('4151', 231733),\n",
       " ('4409', 228888),\n",
       " ('5057', 227946),\n",
       " ('512', 227569),\n",
       " ('1066', 227534),\n",
       " ('486', 227281),\n",
       " ('3870', 223035),\n",
       " ('1854', 222220),\n",
       " ('5096', 220054),\n",
       " ('4562', 219215),\n",
       " ('2313', 217306),\n",
       " ('7467', 216401),\n",
       " ('7058', 216345),\n",
       " ('7261', 216318),\n",
       " ('2828', 215268),\n",
       " ('7492', 213349),\n",
       " ('62', 211926),\n",
       " ('5470', 210210),\n",
       " ('3747', 208521),\n",
       " ('7346', 208320),\n",
       " ('4109', 207564),\n",
       " ('6508', 207142),\n",
       " ('5051', 207072),\n",
       " ('2693', 204412),\n",
       " ('2112', 203493),\n",
       " ('7239', 203244),\n",
       " ('7044', 202832),\n",
       " ('5526', 202501),\n",
       " ('5702', 202119),\n",
       " ('3068', 201739),\n",
       " ('6832', 196476),\n",
       " ('6810', 195375),\n",
       " ('3661', 195347),\n",
       " ('4392', 193333),\n",
       " ('1731', 189497),\n",
       " ('7123', 187998),\n",
       " ('2489', 186899),\n",
       " ('2364', 186643),\n",
       " ('1679', 185330),\n",
       " ('2380', 185069),\n",
       " ('3694', 184761),\n",
       " ('5264', 184502),\n",
       " ('4211', 181347),\n",
       " ('6734', 180653),\n",
       " ('3859', 180628),\n",
       " ('6333', 178463),\n",
       " ('6293', 177438),\n",
       " ('1734', 176826),\n",
       " ('6929', 176534),\n",
       " ('6630', 175907),\n",
       " ('6980', 174960),\n",
       " ('6983', 173274),\n",
       " ('4936', 172864),\n",
       " ('6759', 172617),\n",
       " ('3560', 172400),\n",
       " ('2729', 169086),\n",
       " ('6286', 168857),\n",
       " ('3568', 168823),\n",
       " ('1344', 168561),\n",
       " ('1815', 167744),\n",
       " ('4576', 167374),\n",
       " ('1215', 166529),\n",
       " ('6656', 166067),\n",
       " ('7305', 165601),\n",
       " ('1913', 165175),\n",
       " ('1401', 164868),\n",
       " ('4721', 163827),\n",
       " ('7055', 163624),\n",
       " ('1031', 163242),\n",
       " ('5530', 163097),\n",
       " ('7444', 162672),\n",
       " ('2770', 161542),\n",
       " ('5520', 161014),\n",
       " ('761', 160602),\n",
       " ('5284', 158474),\n",
       " ('4231', 158132),\n",
       " ('2304', 157550),\n",
       " ('3792', 157293),\n",
       " ('150', 157105),\n",
       " ('2538', 156929),\n",
       " ('3634', 156543),\n",
       " ('2461', 155953),\n",
       " ('2549', 155547),\n",
       " ('1647', 155129),\n",
       " ('6501', 154767),\n",
       " ('6641', 154648),\n",
       " ('3630', 154053),\n",
       " ('6101', 153630),\n",
       " ('4630', 153585),\n",
       " ('2975', 153038),\n",
       " ('5037', 152622),\n",
       " ('2087', 151155),\n",
       " ('5271', 150919),\n",
       " ('1877', 150581),\n",
       " ('2967', 150472),\n",
       " ('7370', 150180),\n",
       " ('3193', 149293),\n",
       " ('2471', 149222),\n",
       " ('1036', 149011),\n",
       " ('4498', 147987),\n",
       " ('4139', 147247),\n",
       " ('2410', 146674),\n",
       " ('4230', 146212),\n",
       " ('3038', 144905),\n",
       " ('4655', 144764),\n",
       " ('1859', 144542),\n",
       " ('3706', 142936),\n",
       " ('3196', 142564),\n",
       " ('2827', 142318),\n",
       " ('5640', 142241),\n",
       " ('2621', 142101),\n",
       " ('730', 142039),\n",
       " ('4148', 141452),\n",
       " ('1362', 141418),\n",
       " ('4301', 140343),\n",
       " ('3154', 140083),\n",
       " ('2197', 138468),\n",
       " ('6301', 137955),\n",
       " ('3433', 137425),\n",
       " ('4293', 137197),\n",
       " ('1779', 136809),\n",
       " ('1348', 136009),\n",
       " ('3000', 135812),\n",
       " ('3586', 135633),\n",
       " ('450', 134689),\n",
       " ('7039', 134073),\n",
       " ('6289', 133983),\n",
       " ('1279', 133404),\n",
       " ('6453', 133394),\n",
       " ('3335', 133260),\n",
       " ('606', 132377),\n",
       " ('6609', 132363),\n",
       " ('3780', 132158),\n",
       " ('6770', 131915),\n",
       " ('3864', 131489),\n",
       " ('6206', 131489),\n",
       " ('2147', 130985),\n",
       " ('544', 130362),\n",
       " ('5718', 130081),\n",
       " ('1726', 129458),\n",
       " ('2466', 129235),\n",
       " ('1334', 129195),\n",
       " ('2446', 129169),\n",
       " ('4068', 129125),\n",
       " ('623', 128944),\n",
       " ('4967', 128761),\n",
       " ('5122', 128742),\n",
       " ('2058', 128542),\n",
       " ('4333', 128379),\n",
       " ('2923', 127851),\n",
       " ('7255', 127432),\n",
       " ('6469', 127054),\n",
       " ('1641', 126834),\n",
       " ('2717', 126688),\n",
       " ('4216', 126333),\n",
       " ('2674', 125414),\n",
       " ('6713', 125335),\n",
       " ('4261', 125198),\n",
       " ('6405', 125096),\n",
       " ('955', 124793),\n",
       " ('4350', 124747),\n",
       " ('6714', 124535),\n",
       " ('4933', 124327),\n",
       " ('1264', 124284),\n",
       " ('2810', 124261),\n",
       " ('5282', 124142),\n",
       " ('6822', 124027),\n",
       " ('2456', 123589),\n",
       " ('5450', 123504),\n",
       " ('3578', 121840),\n",
       " ('1271', 121609),\n",
       " ('1816', 121090),\n",
       " ('2402', 121081),\n",
       " ('3523', 121000),\n",
       " ('5328', 120957),\n",
       " ('3440', 120688),\n",
       " ('4499', 120587),\n",
       " ('3317', 120401),\n",
       " ('4462', 119786),\n",
       " ('6920', 119495),\n",
       " ('6811', 118548),\n",
       " ('885', 118487),\n",
       " ('7309', 118368),\n",
       " ('2786', 118221),\n",
       " ('4412', 118203),\n",
       " ('290', 118041),\n",
       " ('433', 117884),\n",
       " ('4671', 117789),\n",
       " ('6909', 117630),\n",
       " ('5681', 117404),\n",
       " ('5192', 117192),\n",
       " ('2115', 116859),\n",
       " ('5538', 115939),\n",
       " ('7328', 114940),\n",
       " ('7160', 114554),\n",
       " ('7449', 114419),\n",
       " ('478', 113346),\n",
       " ('5724', 113091),\n",
       " ('3692', 113016),\n",
       " ('922', 113004),\n",
       " ('19', 112676),\n",
       " ('1844', 112299),\n",
       " ('2791', 112056),\n",
       " ('3067', 111819),\n",
       " ('3397', 111804),\n",
       " ('408', 111735),\n",
       " ('134', 111466),\n",
       " ('6485', 111366),\n",
       " ('6654', 111067),\n",
       " ('264', 110968),\n",
       " ('3912', 110946),\n",
       " ('5787', 110481),\n",
       " ('541', 110400),\n",
       " ('2444', 110181),\n",
       " ('670', 109794),\n",
       " ('4599', 109536),\n",
       " ('7403', 109405),\n",
       " ('5041', 109028),\n",
       " ('6178', 108861),\n",
       " ('1241', 108736),\n",
       " ('7349', 108648),\n",
       " ('2891', 108468),\n",
       " ('7212', 108457),\n",
       " ('94', 108129),\n",
       " ('5338', 108020),\n",
       " ('893', 107988),\n",
       " ('3976', 107726),\n",
       " ('656', 107577),\n",
       " ('4046', 107194),\n",
       " ('4326', 106817),\n",
       " ('4180', 105885),\n",
       " ('3971', 105677),\n",
       " ('4902', 105266),\n",
       " ('350', 105187),\n",
       " ('872', 105109),\n",
       " ('868', 105080),\n",
       " ('4321', 104959),\n",
       " ('6012', 104620),\n",
       " ('4181', 104399),\n",
       " ('3018', 104372),\n",
       " ('133', 104306),\n",
       " ('4089', 104076),\n",
       " ('1610', 103952),\n",
       " ('4173', 103933),\n",
       " ('2154', 103593),\n",
       " ('2192', 103461),\n",
       " ('7159', 103455),\n",
       " ('1952', 103327),\n",
       " ('4298', 103300),\n",
       " ('2463', 103092),\n",
       " ('5139', 102836),\n",
       " ('2151', 102796),\n",
       " ('4417', 102694),\n",
       " ('4233', 102558),\n",
       " ('6227', 102557),\n",
       " ('535', 102551),\n",
       " ('4117', 102324),\n",
       " ('6521', 102154),\n",
       " ('2685', 101866),\n",
       " ('6352', 100918),\n",
       " ('4744', 100904),\n",
       " ('3607', 100677),\n",
       " ('2899', 100337),\n",
       " ('4407', 100192),\n",
       " ('1511', 100052),\n",
       " ('6666', 99425),\n",
       " ('2226', 99379),\n",
       " ('671', 99292),\n",
       " ('2435', 99266),\n",
       " ('1605', 98919),\n",
       " ('5178', 98887),\n",
       " ('7400', 98826),\n",
       " ('2695', 98797),\n",
       " ('4531', 98770),\n",
       " ('1582', 98719),\n",
       " ('5397', 98346),\n",
       " ('3585', 98044),\n",
       " ('3242', 97904),\n",
       " ('1219', 97691),\n",
       " ('1580', 97440),\n",
       " ('4105', 97363),\n",
       " ('1258', 97313),\n",
       " ('2974', 96674),\n",
       " ('6740', 95823),\n",
       " ('5505', 95740),\n",
       " ('2282', 95569),\n",
       " ('4125', 95176),\n",
       " ('2042', 95009),\n",
       " ('790', 94988),\n",
       " ('7256', 94967),\n",
       " ('5864', 94876),\n",
       " ('4923', 94820),\n",
       " ('7486', 94431),\n",
       " ('6966', 94415),\n",
       " ('4866', 94356),\n",
       " ('1695', 93522),\n",
       " ('2522', 93103),\n",
       " ('3695', 92979),\n",
       " ('6569', 92282),\n",
       " ('2477', 92199),\n",
       " ('5165', 91298),\n",
       " ('7154', 90790),\n",
       " ('4080', 90583),\n",
       " ('4612', 90372),\n",
       " ('5547', 90084),\n",
       " ('6050', 89928),\n",
       " ('4981', 89441),\n",
       " ('5955', 89004),\n",
       " ('6088', 88899),\n",
       " ('296', 88775),\n",
       " ('6919', 88693),\n",
       " ('4998', 88366),\n",
       " ('4469', 87940),\n",
       " ('5889', 87540),\n",
       " ('3329', 87484),\n",
       " ('3504', 87437),\n",
       " ('6861', 87336),\n",
       " ('5906', 86871),\n",
       " ('5519', 86379),\n",
       " ('1571', 86231),\n",
       " ('4650', 85822),\n",
       " ('116', 85609),\n",
       " ('2029', 85572),\n",
       " ('383', 85408),\n",
       " ('965', 85169),\n",
       " ('2612', 85158),\n",
       " ('4510', 84886),\n",
       " ('5971', 84626),\n",
       " ('4430', 84473),\n",
       " ('1970', 84194),\n",
       " ('3461', 84149),\n",
       " ('6833', 83431),\n",
       " ('2021', 83310),\n",
       " ('4145', 83094),\n",
       " ('3648', 82396),\n",
       " ('3765', 82330),\n",
       " ('3137', 82029),\n",
       " ('3203', 81830),\n",
       " ('4568', 81269),\n",
       " ('265', 80980),\n",
       " ('5006', 80869),\n",
       " ('4741', 80594),\n",
       " ('826', 80567),\n",
       " ('4355', 80353),\n",
       " ('64', 80309),\n",
       " ('5938', 80285),\n",
       " ('1934', 80192),\n",
       " ('6518', 79937),\n",
       " ('6846', 79669),\n",
       " ('4396', 79520),\n",
       " ('2993', 78445),\n",
       " ('3231', 78381),\n",
       " ('2396', 78364),\n",
       " ('2121', 78357),\n",
       " ('5292', 78294),\n",
       " ('5498', 78097),\n",
       " ('7363', 77837),\n",
       " ('3373', 77817),\n",
       " ('2315', 77707),\n",
       " ('7408', 77670),\n",
       " ('4166', 77670),\n",
       " ('3901', 77233),\n",
       " ('314', 77107),\n",
       " ('3508', 76988),\n",
       " ('343', 76793),\n",
       " ('330', 76626),\n",
       " ('1660', 76315),\n",
       " ('6722', 76295),\n",
       " ('5698', 76166),\n",
       " ('2848', 76116),\n",
       " ('3106', 75716),\n",
       " ('6319', 75640),\n",
       " ('6143', 75564),\n",
       " ('4291', 75135),\n",
       " ('4780', 74760),\n",
       " ('847', 74694),\n",
       " ('1457', 74408),\n",
       " ('6886', 74250),\n",
       " ('1146', 74005),\n",
       " ('2448', 73858),\n",
       " ('5744', 73565),\n",
       " ('1999', 73506),\n",
       " ('6689', 73212),\n",
       " ('248', 73125),\n",
       " ('5497', 73084),\n",
       " ('532', 72897),\n",
       " ('2205', 72463),\n",
       " ('5708', 72344),\n",
       " ('736', 72018),\n",
       " ('5099', 71985),\n",
       " ('2004', 71985),\n",
       " ('1227', 71413),\n",
       " ('6014', 71257),\n",
       " ('137', 71199),\n",
       " ('5235', 71114),\n",
       " ('2506', 71066),\n",
       " ('5810', 70975),\n",
       " ('3117', 70829),\n",
       " ('2990', 70744),\n",
       " ('1323', 70673),\n",
       " ('3764', 70456),\n",
       " ('5166', 70230),\n",
       " ('980', 70223),\n",
       " ('7037', 70156),\n",
       " ('5999', 70120),\n",
       " ('4909', 69754),\n",
       " ('3056', 69420),\n",
       " ('5788', 69415),\n",
       " ('6350', 69314),\n",
       " ('5920', 69162),\n",
       " ('3770', 69124),\n",
       " ('3464', 68706),\n",
       " ('920', 68348),\n",
       " ('7528', 68327),\n",
       " ('1116', 68281),\n",
       " ('2970', 68257),\n",
       " ('3342', 68098),\n",
       " ('751', 67778),\n",
       " ('7420', 67566),\n",
       " ('5816', 67352),\n",
       " ('6535', 67322),\n",
       " ('4986', 66954),\n",
       " ('507', 66766),\n",
       " ('3012', 66755),\n",
       " ('3500', 66494),\n",
       " ('4653', 66477),\n",
       " ('3945', 66273),\n",
       " ('1283', 65758),\n",
       " ('4802', 65749),\n",
       " ('7465', 65350),\n",
       " ('1592', 65330),\n",
       " ('3007', 65160),\n",
       " ('5926', 64872),\n",
       " ('3824', 64705),\n",
       " ('794', 64572),\n",
       " ('663', 64559),\n",
       " ('1308', 64257),\n",
       " ('2688', 64233),\n",
       " ('1395', 63575),\n",
       " ('3937', 63350),\n",
       " ('6182', 63294),\n",
       " ('3310', 63160),\n",
       " ('2334', 62894),\n",
       " ('1919', 62885),\n",
       " ('2255', 62882),\n",
       " ('3289', 62244),\n",
       " ('414', 62210),\n",
       " ('6160', 62203),\n",
       " ('6596', 61972),\n",
       " ('7047', 61864),\n",
       " ('1706', 61825),\n",
       " ('7257', 61734),\n",
       " ('1335', 61402),\n",
       " ('88', 61371),\n",
       " ('5226', 61190),\n",
       " ('5988', 60888),\n",
       " ('584', 60853),\n",
       " ('4381', 60752),\n",
       " ('419', 60569),\n",
       " ('4553', 60532),\n",
       " ('810', 60351),\n",
       " ('565', 60157),\n",
       " ('1613', 60153),\n",
       " ('7013', 60028),\n",
       " ('4351', 59931),\n",
       " ('5521', 59875),\n",
       " ('3495', 59637),\n",
       " ('1778', 59634),\n",
       " ('5105', 59590),\n",
       " ('5370', 59256),\n",
       " ('4751', 59113),\n",
       " ('2984', 58802),\n",
       " ('4114', 58698),\n",
       " ('4042', 58608),\n",
       " ('6798', 58273),\n",
       " ('517', 58194),\n",
       " ('974', 58163),\n",
       " ('7354', 58015),\n",
       " ('1043', 57973),\n",
       " ('6043', 57929),\n",
       " ('6854', 57775),\n",
       " ('4819', 57766),\n",
       " ('591', 57746),\n",
       " ('600', 57594),\n",
       " ('5413', 57497),\n",
       " ('6902', 57481),\n",
       " ('4760', 57375),\n",
       " ('827', 57372),\n",
       " ('3019', 57330),\n",
       " ('1951', 57306),\n",
       " ('5221', 57179),\n",
       " ('2499', 57129),\n",
       " ('7327', 57022),\n",
       " ('101', 56962),\n",
       " ('1924', 56837),\n",
       " ('7006', 56743),\n",
       " ('5909', 56729),\n",
       " ('4399', 56676),\n",
       " ('1684', 56539),\n",
       " ('2851', 56199),\n",
       " ('6220', 56055),\n",
       " ('4237', 56000),\n",
       " ('6768', 55978),\n",
       " ('3366', 55883),\n",
       " ('4450', 55864),\n",
       " ('6678', 55735),\n",
       " ('1245', 55721),\n",
       " ('1405', 55460),\n",
       " ('2592', 55199),\n",
       " ('6223', 55183),\n",
       " ('6284', 54875),\n",
       " ('764', 54871),\n",
       " ('3255', 54773),\n",
       " ('2738', 54707),\n",
       " ('3731', 54661),\n",
       " ('7251', 54127),\n",
       " ('127', 54011),\n",
       " ('5803', 53936),\n",
       " ('7436', 53821),\n",
       " ('6985', 53797),\n",
       " ('1724', 53517),\n",
       " ('3051', 53231),\n",
       " ('6235', 53215),\n",
       " ('1351', 52360),\n",
       " ('4053', 52196),\n",
       " ('2348', 52165),\n",
       " ('5562', 52086),\n",
       " ('2968', 52021),\n",
       " ('641', 51984),\n",
       " ('1688', 51676),\n",
       " ('4315', 51425),\n",
       " ('2007', 51401),\n",
       " ('138', 51394),\n",
       " ('4603', 51373),\n",
       " ('4369', 51334),\n",
       " ('3477', 51291),\n",
       " ('5251', 51260),\n",
       " ('1214', 51237),\n",
       " ('5814', 51103),\n",
       " ('2331', 51035),\n",
       " ('3725', 51011),\n",
       " ('3644', 50946),\n",
       " ('7023', 50928),\n",
       " ('2835', 50894),\n",
       " ('4583', 50873),\n",
       " ('2716', 50660),\n",
       " ('3017', 50579),\n",
       " ('4677', 50552),\n",
       " ('3646', 50499),\n",
       " ('5492', 50458),\n",
       " ('2570', 50126),\n",
       " ('3084', 50123),\n",
       " ('1315', 50085),\n",
       " ('220', 50083),\n",
       " ('1735', 50021),\n",
       " ('4768', 49982),\n",
       " ('1132', 49834),\n",
       " ('6930', 49831),\n",
       " ('7366', 49606),\n",
       " ('2378', 49395),\n",
       " ('2918', 49229),\n",
       " ('5063', 49004),\n",
       " ('5984', 48759),\n",
       " ('3481', 48752),\n",
       " ('4302', 48725),\n",
       " ('1899', 48463),\n",
       " ('3396', 48422),\n",
       " ('2528', 47976),\n",
       " ('144', 47636),\n",
       " ('5081', 47624),\n",
       " ('3819', 47546),\n",
       " ('7134', 47420),\n",
       " ('6165', 47381),\n",
       " ('7127', 47059),\n",
       " ('6962', 46877),\n",
       " ('5791', 46831),\n",
       " ('5957', 46731),\n",
       " ('5179', 46729),\n",
       " ('1152', 46712),\n",
       " ('983', 46688),\n",
       " ('1629', 46676),\n",
       " ('2218', 46635),\n",
       " ('211', 46472),\n",
       " ('5688', 46401),\n",
       " ('53', 46308),\n",
       " ('6751', 46258),\n",
       " ('3186', 46223),\n",
       " ('6602', 46205),\n",
       " ('1697', 45875),\n",
       " ('2983', 45837),\n",
       " ('6163', 45821),\n",
       " ('2838', 45800),\n",
       " ('293', 45798),\n",
       " ('4220', 45706),\n",
       " ('3283', 45537),\n",
       " ('6651', 45503),\n",
       " ('2769', 45495),\n",
       " ('1255', 45447),\n",
       " ('304', 45304),\n",
       " ('5801', 44916),\n",
       " ('5839', 44629),\n",
       " ('2316', 44608),\n",
       " ('4040', 44568),\n",
       " ('5693', 44506),\n",
       " ('6973', 44482),\n",
       " ('3134', 44397),\n",
       " ('6176', 44302),\n",
       " ('6515', 44277),\n",
       " ('3227', 44156),\n",
       " ('5117', 44059),\n",
       " ('979', 43750),\n",
       " ('6977', 43664),\n",
       " ('6567', 43644),\n",
       " ('462', 43615),\n",
       " ('7077', 43595),\n",
       " ('3377', 43387),\n",
       " ('4543', 43271),\n",
       " ('3097', 43148),\n",
       " ('2407', 43060),\n",
       " ('1170', 42845),\n",
       " ('936', 42836),\n",
       " ('7091', 42810),\n",
       " ('6725', 42774),\n",
       " ('1379', 42694),\n",
       " ('543', 42612),\n",
       " ('3247', 42481),\n",
       " ('1914', 42463),\n",
       " ('1879', 42397),\n",
       " ('6027', 42189),\n",
       " ('3364', 42128),\n",
       " ('6308', 42081),\n",
       " ('734', 42048),\n",
       " ('7532', 41981),\n",
       " ('3128', 41959),\n",
       " ('6662', 41797),\n",
       " ('7421', 41735),\n",
       " ('902', 41730),\n",
       " ('3956', 41625),\n",
       " ('26', 41589),\n",
       " ('5095', 41500),\n",
       " ('1103', 41491),\n",
       " ('56', 41441),\n",
       " ('569', 41390),\n",
       " ('7042', 41360),\n",
       " ('4036', 41232),\n",
       " ('6899', 41207),\n",
       " ('4542', 41192),\n",
       " ('3987', 41191),\n",
       " ('6015', 40847),\n",
       " ('6695', 40549),\n",
       " ('6760', 40432),\n",
       " ('1730', 40385),\n",
       " ('4858', 39882),\n",
       " ('7373', 39642),\n",
       " ('4595', 39615),\n",
       " ('3501', 39609),\n",
       " ('2230', 39282),\n",
       " ('5881', 39270),\n",
       " ('6560', 39070),\n",
       " ('3844', 38915),\n",
       " ('1889', 38851),\n",
       " ('873', 38758),\n",
       " ('2367', 38607),\n",
       " ('6115', 38207),\n",
       " ('6003', 38176),\n",
       " ('6552', 38139),\n",
       " ('6007', 38026),\n",
       " ('316', 38003),\n",
       " ('2722', 37960),\n",
       " ('3529', 37661),\n",
       " ('7490', 37501),\n",
       " ('894', 37307),\n",
       " ('2328', 37227),\n",
       " ('7147', 37146),\n",
       " ('5389', 37118),\n",
       " ('4202', 37109),\n",
       " ('495', 36925),\n",
       " ('2602', 36684),\n",
       " ('2131', 36660),\n",
       " ('812', 36657),\n",
       " ('6583', 36488),\n",
       " ('4786', 36476),\n",
       " ('2229', 36371),\n",
       " ('5854', 36277),\n",
       " ('5775', 36014),\n",
       " ('3129', 36007),\n",
       " ('6314', 35890),\n",
       " ('5860', 35716),\n",
       " ('3531', 35610),\n",
       " ('4287', 35580),\n",
       " ('7019', 35516),\n",
       " ('6613', 35200),\n",
       " ('4454', 35138),\n",
       " ('4779', 35115),\n",
       " ('4458', 35049),\n",
       " ('2505', 35043),\n",
       " ('3938', 35041),\n",
       " ('3654', 35030),\n",
       " ('404', 34929),\n",
       " ('499', 34775),\n",
       " ('1805', 34718),\n",
       " ('4340', 34638),\n",
       " ('4558', 34599),\n",
       " ('4329', 34596),\n",
       " ('38', 34510),\n",
       " ('69', 34438),\n",
       " ('5997', 34325),\n",
       " ('6908', 34297),\n",
       " ('3775', 34252),\n",
       " ('442', 34221),\n",
       " ('5511', 34162),\n",
       " ('3032', 34024),\n",
       " ('4372', 33981),\n",
       " ('5005', 33961),\n",
       " ('578', 33933),\n",
       " ('5603', 33917),\n",
       " ('197', 33829),\n",
       " ('6482', 33574),\n",
       " ('1991', 33514),\n",
       " ('1247', 33431),\n",
       " ('5660', 33349),\n",
       " ('1327', 33346),\n",
       " ('5288', 33338),\n",
       " ('1061', 33324),\n",
       " ('5623', 33214),\n",
       " ('431', 33136),\n",
       " ('4648', 33051),\n",
       " ('6663', 33049),\n",
       " ('7032', 32986),\n",
       " ('1299', 32927),\n",
       " ('3130', 32890),\n",
       " ('1292', 32874),\n",
       " ('7292', 32846),\n",
       " ('7344', 32837),\n",
       " ('7326', 32673),\n",
       " ('1388', 32656),\n",
       " ('4377', 32654),\n",
       " ('5466', 32560),\n",
       " ('2318', 32497),\n",
       " ('7206', 32496),\n",
       " ('4021', 32495),\n",
       " ('1623', 32349),\n",
       " ('3598', 32339),\n",
       " ('2076', 32197),\n",
       " ('212', 32170),\n",
       " ('2283', 32083),\n",
       " ('5168', 32075),\n",
       " ('3613', 32050),\n",
       " ('1252', 32013),\n",
       " ('3665', 31938),\n",
       " ('5882', 31821),\n",
       " ('3615', 31820),\n",
       " ('1168', 31745),\n",
       " ('4163', 31738),\n",
       " ('7125', 31555),\n",
       " ('2099', 31543),\n",
       " ('245', 31529),\n",
       " ('5617', 31507),\n",
       " ('6167', 31504),\n",
       " ('2399', 31460),\n",
       " ('5396', 31454),\n",
       " ('6968', 31400),\n",
       " ('7330', 31321),\n",
       " ('3860', 31175),\n",
       " ('368', 31154),\n",
       " ('4636', 31143),\n",
       " ('3949', 30986),\n",
       " ('2211', 30953),\n",
       " ('3198', 30896),\n",
       " ('6972', 30819),\n",
       " ('6639', 30781),\n",
       " ('5741', 30759),\n",
       " ('6729', 30473),\n",
       " ('1267', 30454),\n",
       " ('7219', 30349),\n",
       " ('6615', 30215),\n",
       " ('5243', 30187),\n",
       " ('5486', 30154),\n",
       " ('4223', 29963),\n",
       " ('1757', 29948),\n",
       " ('3270', 29832),\n",
       " ('5239', 29796),\n",
       " ('4547', 29731),\n",
       " ('6588', 29731),\n",
       " ('886', 29725),\n",
       " ('2708', 29704),\n",
       " ('1590', 29645),\n",
       " ('3691', 29624),\n",
       " ('3456', 29618),\n",
       " ('2935', 29601),\n",
       " ('4403', 29538),\n",
       " ('3299', 29522),\n",
       " ('6362', 29519),\n",
       " ('1939', 29490),\n",
       " ('1693', 29467),\n",
       " ('2699', 29431),\n",
       " ('6940', 29308),\n",
       " ('4921', 29306),\n",
       " ('5298', 29207),\n",
       " ('3090', 29163),\n",
       " ('1622', 29147),\n",
       " ('3873', 29138),\n",
       " ('2683', 29091),\n",
       " ('4130', 29061),\n",
       " ('1960', 29043),\n",
       " ('5381', 28988),\n",
       " ('5385', 28875),\n",
       " ('3120', 28803),\n",
       " ('4205', 28752),\n",
       " ('6549', 28713),\n",
       " ('83', 28593),\n",
       " ('5436', 28540),\n",
       " ('6004', 28466),\n",
       " ('6543', 28361),\n",
       " ('6047', 28294),\n",
       " ('443', 28262),\n",
       " ('948', 28153),\n",
       " ('3107', 28111),\n",
       " ('36', 28035),\n",
       " ...]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计字符分布  把上面的text按照空格分割之后 统计一下出现的频率  词的频率和名称形成一个字典 key是元素 value是出现的次数  然后按照次数排列一下\n",
    "from collections import Counter\n",
    "count=Counter(text.split(' '))#统计元素出现的次数以及对应的频率\n",
    "count=sorted(count.items(),key=lambda x:x[1],reverse=True)#按照出现的次数排序 并且经过reverse之后 就倒过来了 就是出现频次最多在前 最少在后\n",
    "count#从这里就可以看出出现的频次  本来是从小到达排序 但是reverse=True表示倒序排序 \n",
    "#这个count是一个大的list 每一个元素是一个元组 元组里面是某个字符以及在整片文档中出现的次数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6869"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(count)#一共是6869个字符 每个字符出现都有顺序"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 开始准备搭建fasttext模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "开始导包\n",
      "导包成功\n"
     ]
    }
   ],
   "source": [
    "print(\"开始导包\")\n",
    "from keras_preprocessing.text import Tokenizer\n",
    "from tensorflow import keras\n",
    "from tensorflow.keras.models import Sequential\n",
    "from tensorflow.keras.layers import Dense,Dropout\n",
    "from tensorflow.keras import regularizers\n",
    "from tensorflow.keras.utils import to_categorical\n",
    "from tensorflow.keras.preprocessing.sequence import pad_sequences\n",
    "print(\"导包成功\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 1min 31s, sys: 257 µs, total: 1min 31s\n",
      "Wall time: 1min 31s\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'3750': 1,\n",
       " '648': 2,\n",
       " '900': 3,\n",
       " '3370': 4,\n",
       " '6122': 5,\n",
       " '4464': 6,\n",
       " '7399': 7,\n",
       " '4939': 8,\n",
       " '3659': 9,\n",
       " '4811': 10,\n",
       " '5598': 11,\n",
       " '669': 12,\n",
       " '2465': 13,\n",
       " '2400': 14,\n",
       " '5560': 15,\n",
       " '299': 16,\n",
       " '2109': 17,\n",
       " '4893': 18,\n",
       " '4411': 19,\n",
       " '1699': 20,\n",
       " '1519': 21,\n",
       " '803': 22,\n",
       " '1635': 23,\n",
       " '6065': 24,\n",
       " '5998': 25,\n",
       " '1903': 26,\n",
       " '5445': 27,\n",
       " '1324': 28,\n",
       " '2376': 29,\n",
       " '340': 30,\n",
       " '4659': 31,\n",
       " '3800': 32,\n",
       " '5948': 33,\n",
       " '1460': 34,\n",
       " '1633': 35,\n",
       " '1985': 36,\n",
       " '6017': 37,\n",
       " '2614': 38,\n",
       " '1465': 39,\n",
       " '3961': 40,\n",
       " '4853': 41,\n",
       " '5393': 42,\n",
       " '2210': 43,\n",
       " '6250': 44,\n",
       " '5602': 45,\n",
       " '3700': 46,\n",
       " '5977': 47,\n",
       " '2799': 48,\n",
       " '4646': 49,\n",
       " '7539': 50,\n",
       " '4516': 51,\n",
       " '2252': 52,\n",
       " '7543': 53,\n",
       " '151': 54,\n",
       " '6357': 55,\n",
       " '619': 56,\n",
       " '3915': 57,\n",
       " '5410': 58,\n",
       " '7495': 59,\n",
       " '913': 60,\n",
       " '6093': 61,\n",
       " '5620': 62,\n",
       " '4128': 63,\n",
       " '5780': 64,\n",
       " '5915': 65,\n",
       " '7194': 66,\n",
       " '4149': 67,\n",
       " '3223': 68,\n",
       " '2073': 69,\n",
       " '307': 70,\n",
       " '1375': 71,\n",
       " '2490': 72,\n",
       " '2662': 73,\n",
       " '5491': 74,\n",
       " '4490': 75,\n",
       " '5296': 76,\n",
       " '5036': 77,\n",
       " '4269': 78,\n",
       " '2106': 79,\n",
       " '5858': 80,\n",
       " '5330': 81,\n",
       " '3686': 82,\n",
       " '1394': 83,\n",
       " '1667': 84,\n",
       " '6045': 85,\n",
       " '465': 86,\n",
       " '3099': 87,\n",
       " '5176': 88,\n",
       " '5430': 89,\n",
       " '2539': 90,\n",
       " '1866': 91,\n",
       " '25': 92,\n",
       " '4559': 93,\n",
       " '6038': 94,\n",
       " '4704': 95,\n",
       " '192': 96,\n",
       " '1141': 97,\n",
       " '1080': 98,\n",
       " '6248': 99,\n",
       " '3272': 100,\n",
       " '5028': 101,\n",
       " '1567': 102,\n",
       " '6831': 103,\n",
       " '4190': 104,\n",
       " '6104': 105,\n",
       " '3618': 106,\n",
       " '3374': 107,\n",
       " '2859': 108,\n",
       " '7010': 109,\n",
       " '1702': 110,\n",
       " '3166': 111,\n",
       " '2119': 112,\n",
       " '3530': 113,\n",
       " '3605': 114,\n",
       " '4525': 115,\n",
       " '6407': 116,\n",
       " '4822': 117,\n",
       " '1099': 118,\n",
       " '6644': 119,\n",
       " '5659': 120,\n",
       " '7186': 121,\n",
       " '3772': 122,\n",
       " '5510': 123,\n",
       " '5589': 124,\n",
       " '531': 125,\n",
       " '6637': 126,\n",
       " '1407': 127,\n",
       " '5619': 128,\n",
       " '2986': 129,\n",
       " '4480': 130,\n",
       " '3641': 131,\n",
       " '4063': 132,\n",
       " '1920': 133,\n",
       " '1722': 134,\n",
       " '1906': 135,\n",
       " '2515': 136,\n",
       " '23': 137,\n",
       " '5677': 138,\n",
       " '910': 139,\n",
       " '5689': 140,\n",
       " '5778': 141,\n",
       " '5736': 142,\n",
       " '4124': 143,\n",
       " '5011': 144,\n",
       " '4167': 145,\n",
       " '5310': 146,\n",
       " '1070': 147,\n",
       " '1767': 148,\n",
       " '2212': 149,\n",
       " '7377': 150,\n",
       " '5612': 151,\n",
       " '7509': 152,\n",
       " '2595': 153,\n",
       " '1018': 154,\n",
       " '1736': 155,\n",
       " '6835': 156,\n",
       " '3263': 157,\n",
       " '281': 158,\n",
       " '3809': 159,\n",
       " '5537': 160,\n",
       " '1363': 161,\n",
       " '1277': 162,\n",
       " '3220': 163,\n",
       " '3893': 164,\n",
       " '3743': 165,\n",
       " '4958': 166,\n",
       " '2555': 167,\n",
       " '2541': 168,\n",
       " '5566': 169,\n",
       " '6887': 170,\n",
       " '1871': 171,\n",
       " '742': 172,\n",
       " '2289': 173,\n",
       " '2107': 174,\n",
       " '2265': 175,\n",
       " '4969': 176,\n",
       " '3300': 177,\n",
       " '2597': 178,\n",
       " '6040': 179,\n",
       " '6242': 180,\n",
       " '5949': 181,\n",
       " '4151': 182,\n",
       " '4409': 183,\n",
       " '5057': 184,\n",
       " '512': 185,\n",
       " '1066': 186,\n",
       " '486': 187,\n",
       " '3870': 188,\n",
       " '1854': 189,\n",
       " '5096': 190,\n",
       " '4562': 191,\n",
       " '2313': 192,\n",
       " '7467': 193,\n",
       " '7261': 194,\n",
       " '7058': 195,\n",
       " '2828': 196,\n",
       " '7492': 197,\n",
       " '62': 198,\n",
       " '5470': 199,\n",
       " '3747': 200,\n",
       " '7346': 201,\n",
       " '4109': 202,\n",
       " '6508': 203,\n",
       " '5051': 204,\n",
       " '2693': 205,\n",
       " '2112': 206,\n",
       " '7044': 207,\n",
       " '5526': 208,\n",
       " '7239': 209,\n",
       " '5702': 210,\n",
       " '3068': 211,\n",
       " '6832': 212,\n",
       " '3661': 213,\n",
       " '6810': 214,\n",
       " '4392': 215,\n",
       " '1731': 216,\n",
       " '7123': 217,\n",
       " '2364': 218,\n",
       " '2489': 219,\n",
       " '2380': 220,\n",
       " '1679': 221,\n",
       " '5264': 222,\n",
       " '3694': 223,\n",
       " '4211': 224,\n",
       " '6734': 225,\n",
       " '3859': 226,\n",
       " '6333': 227,\n",
       " '6293': 228,\n",
       " '1734': 229,\n",
       " '6929': 230,\n",
       " '6630': 231,\n",
       " '6980': 232,\n",
       " '6983': 233,\n",
       " '4936': 234,\n",
       " '6759': 235,\n",
       " '3560': 236,\n",
       " '3568': 237,\n",
       " '2729': 238,\n",
       " '6286': 239,\n",
       " '1215': 240,\n",
       " '1344': 241,\n",
       " '1815': 242,\n",
       " '4576': 243,\n",
       " '6656': 244,\n",
       " '7305': 245,\n",
       " '1401': 246,\n",
       " '1913': 247,\n",
       " '4721': 248,\n",
       " '5530': 249,\n",
       " '7444': 250,\n",
       " '7055': 251,\n",
       " '1031': 252,\n",
       " '2770': 253,\n",
       " '761': 254,\n",
       " '5520': 255,\n",
       " '5284': 256,\n",
       " '2304': 257,\n",
       " '4231': 258,\n",
       " '3792': 259,\n",
       " '2538': 260,\n",
       " '3634': 261,\n",
       " '150': 262,\n",
       " '2549': 263,\n",
       " '2461': 264,\n",
       " '6501': 265,\n",
       " '1647': 266,\n",
       " '6641': 267,\n",
       " '6101': 268,\n",
       " '4630': 269,\n",
       " '3630': 270,\n",
       " '5037': 271,\n",
       " '2975': 272,\n",
       " '2087': 273,\n",
       " '5271': 274,\n",
       " '2967': 275,\n",
       " '1877': 276,\n",
       " '7370': 277,\n",
       " '3193': 278,\n",
       " '2471': 279,\n",
       " '1036': 280,\n",
       " '4498': 281,\n",
       " '4230': 282,\n",
       " '2410': 283,\n",
       " '4139': 284,\n",
       " '3038': 285,\n",
       " '4655': 286,\n",
       " '1859': 287,\n",
       " '3706': 288,\n",
       " '2827': 289,\n",
       " '3196': 290,\n",
       " '2621': 291,\n",
       " '5640': 292,\n",
       " '1362': 293,\n",
       " '730': 294,\n",
       " '4148': 295,\n",
       " '3154': 296,\n",
       " '4301': 297,\n",
       " '2197': 298,\n",
       " '6301': 299,\n",
       " '3433': 300,\n",
       " '4293': 301,\n",
       " '1779': 302,\n",
       " '1348': 303,\n",
       " '3000': 304,\n",
       " '3586': 305,\n",
       " '450': 306,\n",
       " '7039': 307,\n",
       " '1279': 308,\n",
       " '6453': 309,\n",
       " '6289': 310,\n",
       " '3335': 311,\n",
       " '6609': 312,\n",
       " '606': 313,\n",
       " '3780': 314,\n",
       " '6206': 315,\n",
       " '2147': 316,\n",
       " '6770': 317,\n",
       " '3864': 318,\n",
       " '5718': 319,\n",
       " '544': 320,\n",
       " '1334': 321,\n",
       " '1726': 322,\n",
       " '4068': 323,\n",
       " '623': 324,\n",
       " '4967': 325,\n",
       " '5122': 326,\n",
       " '2466': 327,\n",
       " '2446': 328,\n",
       " '7255': 329,\n",
       " '2058': 330,\n",
       " '4333': 331,\n",
       " '4216': 332,\n",
       " '2923': 333,\n",
       " '1641': 334,\n",
       " '2717': 335,\n",
       " '6469': 336,\n",
       " '2674': 337,\n",
       " '6713': 338,\n",
       " '4261': 339,\n",
       " '6405': 340,\n",
       " '6714': 341,\n",
       " '4933': 342,\n",
       " '5282': 343,\n",
       " '1264': 344,\n",
       " '4350': 345,\n",
       " '955': 346,\n",
       " '6822': 347,\n",
       " '2810': 348,\n",
       " '5450': 349,\n",
       " '2456': 350,\n",
       " '1271': 351,\n",
       " '5328': 352,\n",
       " '3578': 353,\n",
       " '1816': 354,\n",
       " '2402': 355,\n",
       " '4499': 356,\n",
       " '3440': 357,\n",
       " '3523': 358,\n",
       " '3317': 359,\n",
       " '4462': 360,\n",
       " '6920': 361,\n",
       " '4412': 362,\n",
       " '7309': 363,\n",
       " '885': 364,\n",
       " '6811': 365,\n",
       " '2786': 366,\n",
       " '290': 367,\n",
       " '433': 368,\n",
       " '4671': 369,\n",
       " '5192': 370,\n",
       " '6909': 371,\n",
       " '5681': 372,\n",
       " '2115': 373,\n",
       " '5538': 374,\n",
       " '7328': 375,\n",
       " '7449': 376,\n",
       " '7160': 377,\n",
       " '922': 378,\n",
       " '1844': 379,\n",
       " '5724': 380,\n",
       " '3692': 381,\n",
       " '478': 382,\n",
       " '2791': 383,\n",
       " '19': 384,\n",
       " '408': 385,\n",
       " '134': 386,\n",
       " '3397': 387,\n",
       " '264': 388,\n",
       " '6485': 389,\n",
       " '3067': 390,\n",
       " '3912': 391,\n",
       " '6654': 392,\n",
       " '2444': 393,\n",
       " '670': 394,\n",
       " '541': 395,\n",
       " '5787': 396,\n",
       " '7403': 397,\n",
       " '94': 398,\n",
       " '7349': 399,\n",
       " '5041': 400,\n",
       " '4599': 401,\n",
       " '1241': 402,\n",
       " '6178': 403,\n",
       " '2891': 404,\n",
       " '7212': 405,\n",
       " '5338': 406,\n",
       " '893': 407,\n",
       " '656': 408,\n",
       " '3976': 409,\n",
       " '4046': 410,\n",
       " '4326': 411,\n",
       " '3971': 412,\n",
       " '868': 413,\n",
       " '4902': 414,\n",
       " '350': 415,\n",
       " '872': 416,\n",
       " '4180': 417,\n",
       " '3018': 418,\n",
       " '4321': 419,\n",
       " '6012': 420,\n",
       " '4181': 421,\n",
       " '133': 422,\n",
       " '1610': 423,\n",
       " '2192': 424,\n",
       " '1952': 425,\n",
       " '4089': 426,\n",
       " '4173': 427,\n",
       " '7159': 428,\n",
       " '4417': 429,\n",
       " '4298': 430,\n",
       " '2463': 431,\n",
       " '4233': 432,\n",
       " '2151': 433,\n",
       " '535': 434,\n",
       " '2154': 435,\n",
       " '5139': 436,\n",
       " '6227': 437,\n",
       " '4117': 438,\n",
       " '6521': 439,\n",
       " '2685': 440,\n",
       " '4744': 441,\n",
       " '6352': 442,\n",
       " '1511': 443,\n",
       " '3607': 444,\n",
       " '2899': 445,\n",
       " '4407': 446,\n",
       " '6666': 447,\n",
       " '1605': 448,\n",
       " '2435': 449,\n",
       " '671': 450,\n",
       " '2226': 451,\n",
       " '2695': 452,\n",
       " '1582': 453,\n",
       " '7400': 454,\n",
       " '5397': 455,\n",
       " '4531': 456,\n",
       " '3585': 457,\n",
       " '3242': 458,\n",
       " '5178': 459,\n",
       " '4105': 460,\n",
       " '1580': 461,\n",
       " '1258': 462,\n",
       " '1219': 463,\n",
       " '6740': 464,\n",
       " '4125': 465,\n",
       " '2974': 466,\n",
       " '4923': 467,\n",
       " '2282': 468,\n",
       " '5864': 469,\n",
       " '5505': 470,\n",
       " '790': 471,\n",
       " '7256': 472,\n",
       " '2042': 473,\n",
       " '7486': 474,\n",
       " '4866': 475,\n",
       " '6966': 476,\n",
       " '1695': 477,\n",
       " '2522': 478,\n",
       " '3695': 479,\n",
       " '6569': 480,\n",
       " '2477': 481,\n",
       " '5165': 482,\n",
       " '4080': 483,\n",
       " '7154': 484,\n",
       " '5547': 485,\n",
       " '6050': 486,\n",
       " '4612': 487,\n",
       " '5955': 488,\n",
       " '4981': 489,\n",
       " '6919': 490,\n",
       " '4998': 491,\n",
       " '6088': 492,\n",
       " '296': 493,\n",
       " '6861': 494,\n",
       " '3504': 495,\n",
       " '4469': 496,\n",
       " '5889': 497,\n",
       " '3329': 498,\n",
       " '5906': 499,\n",
       " '5519': 500,\n",
       " '1571': 501,\n",
       " '2029': 502,\n",
       " '4650': 503,\n",
       " '116': 504,\n",
       " '965': 505,\n",
       " '383': 506,\n",
       " '2612': 507,\n",
       " '5971': 508,\n",
       " '4510': 509,\n",
       " '4430': 510,\n",
       " '3461': 511,\n",
       " '1970': 512,\n",
       " '6833': 513,\n",
       " '2021': 514,\n",
       " '4145': 515,\n",
       " '3765': 516,\n",
       " '3648': 517,\n",
       " '3203': 518,\n",
       " '4568': 519,\n",
       " '3137': 520,\n",
       " '265': 521,\n",
       " '4741': 522,\n",
       " '826': 523,\n",
       " '64': 524,\n",
       " '5938': 525,\n",
       " '6518': 526,\n",
       " '6846': 527,\n",
       " '5006': 528,\n",
       " '4396': 529,\n",
       " '1934': 530,\n",
       " '4355': 531,\n",
       " '2993': 532,\n",
       " '2396': 533,\n",
       " '5292': 534,\n",
       " '3231': 535,\n",
       " '5498': 536,\n",
       " '3373': 537,\n",
       " '7363': 538,\n",
       " '2121': 539,\n",
       " '2315': 540,\n",
       " '7408': 541,\n",
       " '4166': 542,\n",
       " '330': 543,\n",
       " '3901': 544,\n",
       " '3508': 545,\n",
       " '314': 546,\n",
       " '343': 547,\n",
       " '5698': 548,\n",
       " '6722': 549,\n",
       " '1660': 550,\n",
       " '2848': 551,\n",
       " '6319': 552,\n",
       " '3106': 553,\n",
       " '4291': 554,\n",
       " '6143': 555,\n",
       " '4780': 556,\n",
       " '1457': 557,\n",
       " '847': 558,\n",
       " '6886': 559,\n",
       " '2448': 560,\n",
       " '1999': 561,\n",
       " '5744': 562,\n",
       " '1146': 563,\n",
       " '6689': 564,\n",
       " '248': 565,\n",
       " '5497': 566,\n",
       " '532': 567,\n",
       " '2205': 568,\n",
       " '5708': 569,\n",
       " '5099': 570,\n",
       " '2004': 571,\n",
       " '736': 572,\n",
       " '2506': 573,\n",
       " '1227': 574,\n",
       " '137': 575,\n",
       " '3117': 576,\n",
       " '5235': 577,\n",
       " '1323': 578,\n",
       " '6014': 579,\n",
       " '5810': 580,\n",
       " '2990': 581,\n",
       " '3764': 582,\n",
       " '5999': 583,\n",
       " '5166': 584,\n",
       " '7037': 585,\n",
       " '980': 586,\n",
       " '6350': 587,\n",
       " '3770': 588,\n",
       " '5788': 589,\n",
       " '4909': 590,\n",
       " '3056': 591,\n",
       " '5920': 592,\n",
       " '1116': 593,\n",
       " '2970': 594,\n",
       " '3464': 595,\n",
       " '920': 596,\n",
       " '7528': 597,\n",
       " '751': 598,\n",
       " '3342': 599,\n",
       " '4986': 600,\n",
       " '7420': 601,\n",
       " '6535': 602,\n",
       " '5816': 603,\n",
       " '507': 604,\n",
       " '4653': 605,\n",
       " '3500': 606,\n",
       " '3012': 607,\n",
       " '3945': 608,\n",
       " '1283': 609,\n",
       " '7465': 610,\n",
       " '1592': 611,\n",
       " '4802': 612,\n",
       " '3007': 613,\n",
       " '5926': 614,\n",
       " '794': 615,\n",
       " '663': 616,\n",
       " '3824': 617,\n",
       " '1308': 618,\n",
       " '2688': 619,\n",
       " '1395': 620,\n",
       " '3937': 621,\n",
       " '6182': 622,\n",
       " '2255': 623,\n",
       " '2334': 624,\n",
       " '3310': 625,\n",
       " '3289': 626,\n",
       " '1919': 627,\n",
       " '1706': 628,\n",
       " '6596': 629,\n",
       " '414': 630,\n",
       " '7047': 631,\n",
       " '1335': 632,\n",
       " '6160': 633,\n",
       " '7257': 634,\n",
       " '5226': 635,\n",
       " '88': 636,\n",
       " '4553': 637,\n",
       " '584': 638,\n",
       " '419': 639,\n",
       " '810': 640,\n",
       " '565': 641,\n",
       " '4381': 642,\n",
       " '7013': 643,\n",
       " '1613': 644,\n",
       " '5988': 645,\n",
       " '4351': 646,\n",
       " '5521': 647,\n",
       " '5105': 648,\n",
       " '3495': 649,\n",
       " '1778': 650,\n",
       " '4751': 651,\n",
       " '5370': 652,\n",
       " '2984': 653,\n",
       " '4114': 654,\n",
       " '6043': 655,\n",
       " '517': 656,\n",
       " '7354': 657,\n",
       " '6798': 658,\n",
       " '974': 659,\n",
       " '4042': 660,\n",
       " '4819': 661,\n",
       " '1043': 662,\n",
       " '6854': 663,\n",
       " '1951': 664,\n",
       " '591': 665,\n",
       " '5413': 666,\n",
       " '827': 667,\n",
       " '600': 668,\n",
       " '4760': 669,\n",
       " '3019': 670,\n",
       " '5221': 671,\n",
       " '6902': 672,\n",
       " '7327': 673,\n",
       " '7006': 674,\n",
       " '2499': 675,\n",
       " '101': 676,\n",
       " '4399': 677,\n",
       " '1684': 678,\n",
       " '5909': 679,\n",
       " '6768': 680,\n",
       " '1924': 681,\n",
       " '2851': 682,\n",
       " '6220': 683,\n",
       " '3366': 684,\n",
       " '6678': 685,\n",
       " '4237': 686,\n",
       " '4450': 687,\n",
       " '1245': 688,\n",
       " '1405': 689,\n",
       " '2592': 690,\n",
       " '764': 691,\n",
       " '6223': 692,\n",
       " '6284': 693,\n",
       " '3731': 694,\n",
       " '3255': 695,\n",
       " '2738': 696,\n",
       " '127': 697,\n",
       " '7251': 698,\n",
       " '6985': 699,\n",
       " '7436': 700,\n",
       " '5803': 701,\n",
       " '3051': 702,\n",
       " '1724': 703,\n",
       " '6235': 704,\n",
       " '1351': 705,\n",
       " '641': 706,\n",
       " '1688': 707,\n",
       " '2968': 708,\n",
       " '4053': 709,\n",
       " '5251': 710,\n",
       " '2348': 711,\n",
       " '2007': 712,\n",
       " '5562': 713,\n",
       " '5814': 714,\n",
       " '4369': 715,\n",
       " '4315': 716,\n",
       " '138': 717,\n",
       " '1214': 718,\n",
       " '3477': 719,\n",
       " '2716': 720,\n",
       " '2331': 721,\n",
       " '3725': 722,\n",
       " '5492': 723,\n",
       " '2835': 724,\n",
       " '4583': 725,\n",
       " '4677': 726,\n",
       " '3084': 727,\n",
       " '4603': 728,\n",
       " '3644': 729,\n",
       " '7023': 730,\n",
       " '220': 731,\n",
       " '3017': 732,\n",
       " '3646': 733,\n",
       " '1735': 734,\n",
       " '2570': 735,\n",
       " '4768': 736,\n",
       " '1315': 737,\n",
       " '6930': 738,\n",
       " '1132': 739,\n",
       " '7366': 740,\n",
       " '2378': 741,\n",
       " '5063': 742,\n",
       " '5984': 743,\n",
       " '2918': 744,\n",
       " '1899': 745,\n",
       " '3396': 746,\n",
       " '3481': 747,\n",
       " '4302': 748,\n",
       " '2528': 749,\n",
       " '144': 750,\n",
       " '5081': 751,\n",
       " '3819': 752,\n",
       " '6165': 753,\n",
       " '2218': 754,\n",
       " '6962': 755,\n",
       " '7134': 756,\n",
       " '1152': 757,\n",
       " '5957': 758,\n",
       " '5791': 759,\n",
       " '7127': 760,\n",
       " '1629': 761,\n",
       " '983': 762,\n",
       " '5688': 763,\n",
       " '211': 764,\n",
       " '5179': 765,\n",
       " '6602': 766,\n",
       " '3186': 767,\n",
       " '53': 768,\n",
       " '1697': 769,\n",
       " '6751': 770,\n",
       " '3283': 771,\n",
       " '2983': 772,\n",
       " '4220': 773,\n",
       " '2838': 774,\n",
       " '293': 775,\n",
       " '6651': 776,\n",
       " '6163': 777,\n",
       " '304': 778,\n",
       " '1255': 779,\n",
       " '2769': 780,\n",
       " '5801': 781,\n",
       " '5839': 782,\n",
       " '5117': 783,\n",
       " '6973': 784,\n",
       " '3134': 785,\n",
       " '2316': 786,\n",
       " '6176': 787,\n",
       " '4040': 788,\n",
       " '5693': 789,\n",
       " '3227': 790,\n",
       " '6515': 791,\n",
       " '979': 792,\n",
       " '6977': 793,\n",
       " '462': 794,\n",
       " '7077': 795,\n",
       " '3377': 796,\n",
       " '6567': 797,\n",
       " '936': 798,\n",
       " '2407': 799,\n",
       " '1170': 800,\n",
       " '6725': 801,\n",
       " '4543': 802,\n",
       " '7091': 803,\n",
       " '3097': 804,\n",
       " '543': 805,\n",
       " '1379': 806,\n",
       " '3247': 807,\n",
       " '3364': 808,\n",
       " '1914': 809,\n",
       " '1879': 810,\n",
       " '734': 811,\n",
       " '7532': 812,\n",
       " '6027': 813,\n",
       " '7421': 814,\n",
       " '6308': 815,\n",
       " '6662': 816,\n",
       " '3128': 817,\n",
       " '1103': 818,\n",
       " '26': 819,\n",
       " '902': 820,\n",
       " '569': 821,\n",
       " '3956': 822,\n",
       " '4542': 823,\n",
       " '7042': 824,\n",
       " '5095': 825,\n",
       " '3987': 826,\n",
       " '56': 827,\n",
       " '6899': 828,\n",
       " '4036': 829,\n",
       " '6015': 830,\n",
       " '6695': 831,\n",
       " '6760': 832,\n",
       " '1730': 833,\n",
       " '4858': 834,\n",
       " '7373': 835,\n",
       " '4595': 836,\n",
       " '6560': 837,\n",
       " '2230': 838,\n",
       " '3501': 839,\n",
       " '5881': 840,\n",
       " '873': 841,\n",
       " '2367': 842,\n",
       " '3844': 843,\n",
       " '1889': 844,\n",
       " '6115': 845,\n",
       " '316': 846,\n",
       " '6552': 847,\n",
       " '6007': 848,\n",
       " '6003': 849,\n",
       " '7490': 850,\n",
       " '3529': 851,\n",
       " '2722': 852,\n",
       " '495': 853,\n",
       " '5389': 854,\n",
       " '7147': 855,\n",
       " '4202': 856,\n",
       " '2328': 857,\n",
       " '894': 858,\n",
       " '2131': 859,\n",
       " '812': 860,\n",
       " '6583': 861,\n",
       " '4786': 862,\n",
       " '2602': 863,\n",
       " '5854': 864,\n",
       " '2229': 865,\n",
       " '5860': 866,\n",
       " '5775': 867,\n",
       " '6314': 868,\n",
       " '3129': 869,\n",
       " '7019': 870,\n",
       " '3531': 871,\n",
       " '4287': 872,\n",
       " '6613': 873,\n",
       " '4454': 874,\n",
       " '404': 875,\n",
       " '4458': 876,\n",
       " '4779': 877,\n",
       " '3938': 878,\n",
       " '2505': 879,\n",
       " '1805': 880,\n",
       " '3654': 881,\n",
       " '4329': 882,\n",
       " '4340': 883,\n",
       " '4558': 884,\n",
       " '499': 885,\n",
       " '6908': 886,\n",
       " '5997': 887,\n",
       " '38': 888,\n",
       " '442': 889,\n",
       " '5511': 890,\n",
       " '3775': 891,\n",
       " '5603': 892,\n",
       " '578': 893,\n",
       " '69': 894,\n",
       " '4372': 895,\n",
       " '1991': 896,\n",
       " '3032': 897,\n",
       " '197': 898,\n",
       " '5623': 899,\n",
       " '5005': 900,\n",
       " '5288': 901,\n",
       " '6482': 902,\n",
       " '1247': 903,\n",
       " '5660': 904,\n",
       " '6663': 905,\n",
       " '7032': 906,\n",
       " '4648': 907,\n",
       " '431': 908,\n",
       " '1061': 909,\n",
       " '3130': 910,\n",
       " '1327': 911,\n",
       " '1292': 912,\n",
       " '1299': 913,\n",
       " '4021': 914,\n",
       " '7326': 915,\n",
       " '5466': 916,\n",
       " '1388': 917,\n",
       " '7344': 918,\n",
       " '4377': 919,\n",
       " '7292': 920,\n",
       " '7206': 921,\n",
       " '5168': 922,\n",
       " '2076': 923,\n",
       " '2318': 924,\n",
       " '3598': 925,\n",
       " '2283': 926,\n",
       " '212': 927,\n",
       " '3613': 928,\n",
       " '3615': 929,\n",
       " '1168': 930,\n",
       " '1623': 931,\n",
       " '1252': 932,\n",
       " '3665': 933,\n",
       " '5396': 934,\n",
       " '5882': 935,\n",
       " '245': 936,\n",
       " '2399': 937,\n",
       " '4163': 938,\n",
       " '2099': 939,\n",
       " '7330': 940,\n",
       " '6968': 941,\n",
       " '6167': 942,\n",
       " '7125': 943,\n",
       " '5617': 944,\n",
       " '3860': 945,\n",
       " '2211': 946,\n",
       " '3949': 947,\n",
       " '3198': 948,\n",
       " '368': 949,\n",
       " '4636': 950,\n",
       " '6972': 951,\n",
       " '5741': 952,\n",
       " '6639': 953,\n",
       " '1267': 954,\n",
       " '7219': 955,\n",
       " '6729': 956,\n",
       " '5243': 957,\n",
       " '5486': 958,\n",
       " '4223': 959,\n",
       " '886': 960,\n",
       " '2708': 961,\n",
       " '1757': 962,\n",
       " '6588': 963,\n",
       " '5239': 964,\n",
       " '3691': 965,\n",
       " '2935': 966,\n",
       " '6615': 967,\n",
       " '4403': 968,\n",
       " '1590': 969,\n",
       " '3270': 970,\n",
       " '4547': 971,\n",
       " '6362': 972,\n",
       " '1693': 973,\n",
       " '2699': 974,\n",
       " '6940': 975,\n",
       " '1939': 976,\n",
       " '3456': 977,\n",
       " '4921': 978,\n",
       " '3299': 979,\n",
       " '3873': 980,\n",
       " '5381': 981,\n",
       " '1622': 982,\n",
       " '6549': 983,\n",
       " '3090': 984,\n",
       " '2683': 985,\n",
       " '4130': 986,\n",
       " '1960': 987,\n",
       " '3120': 988,\n",
       " '5298': 989,\n",
       " '5385': 990,\n",
       " '4205': 991,\n",
       " '5436': 992,\n",
       " '6047': 993,\n",
       " '6543': 994,\n",
       " '6004': 995,\n",
       " '83': 996,\n",
       " '3107': 997,\n",
       " '4183': 998,\n",
       " '3469': 999,\n",
       " '36': 1000,\n",
       " ...}"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "#设置一下最大的长度（大于这个长度之后就砍掉 小于这个长度之后就补）\n",
    "max_len=6000\n",
    "#用当前的预料训练一个vocab\n",
    "tokenizer = Tokenizer()#对文本语料进行向量化\n",
    "tokenizer.fit_on_texts(train['text'].tolist())#基于texts构建词汇表 把texts喂入fit_on_texts方法里面去\n",
    "tokenizer.fit_on_texts(test['text'].tolist())\n",
    "#上面两行是训练词汇  然后拿到词汇表  这个数据集比上一个恶意程序检测数据量小多了  直接打印出来看看吧\n",
    "vocab=tokenizer.word_index#\n",
    "vocab"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'list'> \n",
      " <class 'list'>\n"
     ]
    }
   ],
   "source": [
    "#训练好了 直接应用\n",
    "x_train_word_ids=tokenizer.texts_to_sequences(train['text'].tolist())\n",
    "x_test_word_ids=tokenizer.texts_to_sequences(test['text'].tolist())\n",
    "print(type(x_train_word_ids),'\\n',type(x_test_word_ids))#应该都是list类型  然后只打印前5个元素来看看"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "200000 \t 50000\n",
      "x_train_word_ids: [[275, 1099, 1530, 514, 189, 694, 202, 259, 67, 21, 330, 391, 13, 283, 463, 392, 50, 388, 350, 10, 912, 17, 1180, 255, 195, 85, 261, 2811, 113, 203, 13, 207, 21, 9, 69, 1, 694, 202, 259, 103, 38, 4, 78, 4, 187, 1445, 202, 465, 1, 27, 327, 103, 1099, 165, 270, 322, 192, 499, 523, 51, 1044, 3, 171, 207, 1, 275, 694, 962, 976, 2, 196, 95, 307, 288, 1, 505, 72, 7, 165, 1157, 799, 1419, 891, 37, 25, 334, 16, 95, 291, 1064, 591, 227, 368, 2, 84, 118, 3, 173, 118, 2, 64, 731, 207, 308, 2330, 78, 1, 275, 1099, 1004, 87, 568, 245, 1751, 47, 1, 498, 1069, 447, 473, 278, 67, 21, 307, 288, 328, 1587, 2, 143, 330, 391, 565, 278, 52, 1198, 149, 8, 209, 625, 115, 14, 3, 1445, 202, 465, 207, 978, 521, 1135, 1575, 20, 12, 116, 1, 351, 351, 522, 12, 31, 188, 1456, 145, 406, 92, 1172, 371, 429, 287, 1, 39, 66, 2, 878, 501, 1450, 1042, 667, 1190, 1, 896, 250, 585, 238, 1631, 815, 1, 844, 214, 104, 665, 11, 173, 17, 103, 116, 14, 58, 656, 3, 92, 694, 202, 259, 63, 221, 10, 41, 202, 270, 672, 5, 26, 155, 57, 863, 347, 1, 231, 2230, 665, 1111, 1580, 2, 39, 246, 41, 2, 840, 622, 63, 221, 8, 1270, 1106, 30, 375, 1843, 3, 34, 56, 470, 29, 41, 100, 1, 41, 202, 270, 672, 1696, 348, 1, 22, 36, 63, 12, 384, 203, 3, 23, 171, 150, 5, 37, 1, 173, 118, 878, 501, 152, 71, 42, 124, 271, 373, 2047, 146, 365, 61, 3, 7, 283, 463, 392, 157, 37, 1, 25, 8, 508, 295, 1, 22, 36, 66, 556, 1301, 94, 258, 2, 134, 116, 1, 118, 389, 133, 148, 65, 526, 61, 11, 1339, 1975, 3, 915, 180, 352, 718, 188, 36, 66, 25, 952, 373, 60, 1297, 32, 2728, 1299, 225, 37, 1, 36, 9, 28, 714, 491, 88, 434, 7, 70, 323, 187, 84, 118, 539, 116, 1, 601, 87, 94, 258, 104, 21, 695, 217, 1051, 535, 23, 117, 134, 1, 275, 694, 962, 976, 2, 2690, 526, 14, 38, 81, 249, 83, 8, 26, 59, 209, 3, 496, 249, 95, 16, 193, 539, 12, 789, 1, 106, 16, 222, 41, 229, 846, 196, 27, 104, 8, 1083, 655, 29, 252, 254, 3, 652, 1059, 43, 12, 43, 87, 161, 299, 545, 1293, 283, 152, 319, 395, 1, 22, 275, 1099, 285, 267, 36, 66, 185, 10, 365, 957, 206, 1, 229, 29, 404, 1524, 2, 634, 295, 428, 84, 1, 603, 856, 14, 469, 57, 7, 1697, 84, 47, 673, 472, 966, 234, 84, 433, 3, 103, 401, 622, 790, 226, 87, 152, 472, 1, 36, 66, 63, 1159, 502, 241, 231, 11, 39, 2, 288, 397, 805, 285, 3, 36, 66, 32, 586, 37, 586, 143, 2, 3, 23, 114, 101, 694, 202, 259, 91, 353, 57, 2, 8, 632, 447, 837, 1, 106, 545, 1293, 283, 247, 244, 1, 196, 95, 491, 8, 307, 57, 145, 406, 1, 22, 36, 8, 157, 217, 388, 350, 140, 17, 2, 1, 61, 20, 124, 19, 91, 1836, 2, 84, 118, 304, 601, 308, 272, 97, 1660, 1, 36, 57, 735, 234, 25, 276, 304, 601, 3, 23, 199, 192, 469, 706, 331, 1, 57, 120, 846, 196, 253, 88, 22, 1574, 812, 313, 232, 23, 1, 22, 1217, 307, 32, 2353, 87, 152, 782, 1, 91, 246, 419, 589, 21, 5, 340, 8, 25, 238, 3, 36, 66, 25, 173, 174, 21, 611, 846, 196, 221, 10, 3430, 1487, 115, 1961, 1, 149, 172, 1, 36, 66, 1004, 632, 27, 1, 39, 66, 63, 170, 661, 47, 68, 335, 3, 151, 33, 1, 36, 66, 173, 60, 32, 10, 5, 38, 1574, 812, 313, 232, 3, 36, 168, 183, 122, 420, 1420, 15, 427, 816, 630, 30, 846, 465, 63, 32, 12, 1737, 661, 47, 3, 23, 92, 34, 56, 207, 978, 2, 446, 32, 402, 668, 1, 199, 192, 706, 331, 50, 22, 846, 465, 2, 113, 126, 821, 36, 304, 31, 1241, 1181, 1, 106, 36, 170, 109, 188, 3, 57, 8, 109, 188, 11, 36, 83, 387, 11, 3, 23, 34, 56, 569, 632, 526, 295, 1, 283, 463, 392, 52, 110, 11, 22, 49, 17, 1180, 255, 23, 1091, 364, 74, 39, 117, 134, 144, 29, 67, 26, 73, 1, 22, 846, 196, 148, 65, 24, 473, 632, 11, 1, 619, 11, 535, 64, 7, 1, 10, 589, 912, 334, 84, 118, 10, 42, 116, 569, 1004, 632, 447, 3, 846, 465, 10, 2, 8, 685, 1, 514, 322, 30, 496, 1056, 63, 12, 42, 1727, 296, 1, 64, 7, 12, 57, 320, 198, 45, 247, 11, 1, 226, 235, 8, 49, 247, 3, 23, 148, 65, 24, 6, 714, 2, 283, 463, 392, 242, 20, 94, 258, 548, 71, 198, 70, 1, 22, 16, 222, 34, 846, 196, 27, 1, 36, 1697, 84, 152, 68, 1, 25, 8, 12, 218, 272, 2, 3, 36, 285, 525, 922, 588, 84, 1, 335, 949, 789, 1112, 1, 36, 859, 371, 424, 97, 103, 830, 3, 318, 66, 71, 42, 242, 20, 36, 64, 7, 372, 87, 88, 188, 11, 1, 36, 285, 1026, 231, 428, 84, 3, 23, 120, 150, 111, 27, 1, 1069, 447, 2, 38, 142, 160, 208, 63, 170, 10, 853, 2665, 3, 39, 66, 148, 120, 283, 463, 392, 30, 293, 1394, 257, 278, 347, 1, 81, 222, 419, 1, 427, 128, 202, 437, 2, 65, 791, 18, 758, 655, 1, 181, 19, 58, 896, 63, 523, 72, 278, 863, 1, 22, 36, 66, 51, 222, 83, 32, 120, 694, 202, 259, 751, 744, 1, 204, 36, 151, 384, 1, 694, 202, 259, 319, 209, 278, 347, 3, 23, 150, 142, 1, 568, 245, 1751, 473, 370, 2433, 114, 170, 1188, 16, 2, 1620, 2975, 1863, 270, 110, 177, 50, 22, 36, 30, 694, 202, 259, 104, 10, 6, 21, 141, 111, 1, 36, 285, 704, 7, 25, 192, 3, 23, 92, 139, 56, 8, 644, 565, 278, 522, 18, 1, 275, 694, 962, 976, 2, 59, 101, 181, 8, 50, 22, 10, 623, 57, 1, 83, 522, 3, 170, 623, 57, 1, 83, 12, 522, 3, 23], [6, 187, 442, 128, 13, 612, 1787, 520, 141, 27, 819, 905, 249, 67, 129, 1171, 74, 9, 73, 2147, 129, 622, 728, 163, 20, 140, 27, 133, 102, 34, 127, 968, 1, 18, 2, 2147, 129, 2135, 1474, 7, 5, 1019, 2, 622, 728, 14, 12, 501, 338, 87, 31, 807, 53, 2, 408, 853, 1, 106, 51, 102, 25, 365, 622, 728, 71, 33, 322, 1826, 30, 2215, 1729, 2147, 129, 2135, 1474, 1, 10, 539, 1208, 309, 2135, 1474, 2, 782, 345, 304, 3, 3075, 2025, 7, 2547, 146, 16, 1, 2314, 1775, 1225, 56, 82, 102, 1, 1043, 102, 3276, 340, 1, 136, 2222, 261, 58, 1826, 29, 1, 546, 136, 322, 782, 5, 613, 322, 116, 2542, 3, 1368, 129, 580, 580, 2027, 225, 1, 546, 2222, 2027, 225, 72, 322, 116, 2542, 618, 214, 31, 51, 392, 70, 130, 1, 172, 47, 408, 51, 136, 2222, 3, 317, 336, 266, 228, 50, 622, 728, 306, 884, 47, 408, 51, 322, 116, 2542, 1, 546, 136, 205, 1223, 1, 261, 58, 1826, 29, 1, 286, 408, 853, 329, 109, 1, 104, 71, 33, 10, 539, 5054, 322, 2641, 415, 3, 1602, 129, 622, 728, 25, 365, 1141, 1286, 622, 728, 71, 33, 152, 143, 82, 2215, 1729, 1598, 116, 30, 648, 244, 206, 3, 490, 7, 360, 82, 1, 261, 768, 1287, 1141, 5, 486, 115, 47, 320, 261, 355, 261, 155, 470, 109, 96, 5, 138, 3, 172, 47, 261, 58, 15, 261, 47, 400, 1141, 1286, 5, 138, 1, 382, 209, 1141, 1286, 2, 413, 130, 12, 57, 516, 17, 3, 1141, 1286, 9, 4, 1236, 681, 115, 47, 71, 33, 137, 472, 396, 408, 1270, 1141, 1286, 2, 436, 1690, 15, 525, 372, 1141, 1286, 1028, 611, 2, 140, 608, 3, 317, 336, 266, 228, 50, 1141, 1286, 27, 2111, 782, 2230, 1053, 1, 71, 33, 198, 70, 109, 96, 2, 478, 130, 1, 63, 42, 354, 622, 728, 257, 31, 185, 143, 2, 539, 230, 3, 1756, 129, 622, 728, 2215, 1729, 1756, 129, 2135, 1474, 91, 143, 2, 80, 181, 83, 8, 3075, 2025, 1278, 3, 3075, 2025, 7, 2063, 146, 16, 1, 546, 136, 53, 88, 120, 1881, 111, 1127, 1, 1278, 82, 3, 546, 1602, 176, 2733, 1, 546, 1043, 1043, 1775, 217, 82, 1, 33, 546, 136, 30, 1043, 1775, 20, 334, 105, 72, 249, 123, 1278, 225, 1, 162, 31, 17, 2222, 120, 132, 2222, 61, 46, 4, 3199, 15, 17, 2222, 120, 1881, 111, 70, 27, 1, 2027, 70, 747, 1602, 3, 382, 209, 286, 25, 26, 109, 96, 27, 855, 129, 1503, 340, 1, 145, 455, 157, 261, 82, 102, 3, 317, 336, 266, 228, 50, 12, 57, 163, 20, 12, 728, 1475, 25, 26, 109, 96, 92, 408, 1295, 622, 728, 1, 25, 365, 109, 96, 34, 354, 136, 2371, 231, 665, 2, 71, 42, 206, 185, 132, 3], [201, 323, 2987, 200, 372, 61, 1504, 451, 657, 299, 13, 492, 80, 331, 1225, 246, 64, 367, 395, 587, 74, 461, 73, 81, 113, 386, 74, 195, 85, 13, 688, 2418, 1541, 13, 134, 728, 62, 13, 480, 1813, 2424, 73, 480, 1340, 1679, 399, 1065, 89, 15, 345, 1848, 1131, 399, 1532, 680, 15, 275, 33, 2250, 399, 480, 468, 468, 15, 894, 146, 399, 1532, 2016, 1340, 15, 1170, 263, 399, 590, 814, 15, 1303, 2785, 399, 259, 255, 955, 15, 1854, 971, 1048, 399, 4312, 1053, 15, 473, 407, 1661, 30, 1063, 17, 2998, 114, 8, 97, 289, 1934, 829, 1048, 30, 1170, 71, 29, 399, 3, 583, 41, 1, 59, 717, 201, 323, 2987, 200, 7, 549, 263, 263, 187, 890, 3145, 2, 323, 2987, 281, 296, 465, 618, 43, 59, 781, 52, 224, 32, 1, 657, 14, 103, 399, 5, 5, 1555, 1079, 3, 12, 75, 271, 56, 151, 10, 646, 339, 556, 5, 339, 2, 8, 1099, 1062, 97, 289, 1, 422, 994, 521, 37, 93, 389, 506, 788, 50, 22, 31, 598, 8, 570, 65, 1024, 153, 1210, 104, 8, 570, 1504, 451, 657, 299, 23, 407, 1661, 78, 1682, 76, 2233, 104, 1777, 876, 271, 575, 65, 7, 201, 661, 82, 596, 88, 136, 86, 200, 14, 1512, 399, 289, 280, 510, 1531, 1018, 97, 2, 1737, 1978, 1978, 29, 399, 289, 5, 510, 1682, 76, 2233, 2, 479, 965, 11, 1218, 255, 1, 12, 75, 91, 231, 93, 389, 308, 383, 2, 469, 8, 657, 14, 556, 5, 339, 2, 17, 97, 289, 50, 22, 478, 203, 201, 323, 2987, 200, 14, 83, 170, 10, 5, 26, 2154, 5, 105, 2, 1129, 299, 23, 93, 389, 22, 561, 680, 549, 23, 331, 1, 341, 1119, 97, 289, 275, 33, 2250, 399, 5, 367, 97, 18, 480, 468, 468, 104, 101, 87, 75, 215, 1, 106, 117, 39, 289, 646, 599, 172, 7, 97, 2043, 16, 114, 12, 78, 325, 776, 50, 932, 1231, 2312, 1077, 280, 1815, 8, 97, 289, 497, 755, 1759, 1, 932, 17, 2373, 1063, 17, 2998, 185, 8, 271, 206, 304, 97, 289, 1170, 71, 29, 399, 3, 93, 389, 22, 68, 199, 879, 1367, 165, 23, 331, 50, 22, 91, 721, 1477, 2, 8, 360, 81, 226, 235, 505, 373, 505, 2154, 2, 407, 1661, 1, 1059, 172, 8, 1934, 829, 1048, 37, 399, 1, 325, 78, 1737, 1978, 1978, 10, 507, 506, 68, 11, 1, 259, 255, 955, 1085, 192, 104, 32, 157, 16, 1682, 76, 2233, 1, 340, 241, 750, 726, 407, 1661, 11, 975, 535, 23, 100, 405, 480, 4596, 943, 880, 503, 12, 1099, 360, 1210, 14, 1, 351, 5, 26, 1323, 549, 143, 1006, 114, 10, 1533, 673, 2, 1762, 882, 1, 373, 717, 14, 439, 838, 8, 740, 585, 360, 1210, 1762, 882, 1172, 735, 2, 199, 430, 646, 339, 1, 92, 59, 717, 469, 12, 292, 25, 277, 68, 1, 406, 425, 861, 838, 221, 10, 5, 26, 483, 483, 1099, 3, 1854, 971, 1048, 399, 22, 759, 997, 125, 407, 23, 4312, 1053, 1, 197, 93, 389, 761, 20, 91, 12, 17, 507, 2, 18, 420, 251, 92, 527, 199, 1170, 263, 37, 399, 2667, 146, 348, 590, 814, 469, 424, 124, 61, 11, 615, 1781, 251, 22, 880, 68, 482, 23, 1065, 89, 63, 61, 11, 1099, 1062, 271, 480, 1340, 1679, 29, 399, 3, 93, 389, 110, 177, 1, 22, 509, 405, 480, 4596, 15, 943, 880, 503, 162, 2024, 4168, 646, 339, 352, 320, 267, 1099, 1062, 399, 11, 1, 12, 172, 290, 513, 2, 157, 12, 51, 215, 11, 3, 23, 492, 80, 331, 1225, 246, 64, 367, 395, 587, 34, 56, 93, 389, 506, 788, 1, 583, 41, 195, 85, 476, 709, 657, 365, 743, 330, 1408, 943, 187, 1, 39, 110, 177, 1, 59, 201, 323, 2987, 200, 264, 492, 80, 7, 646, 339, 3662, 287, 16, 475, 53, 872, 620, 1, 12, 533, 7, 1371, 135, 646, 339, 2, 179, 488, 1, 1408, 943, 187, 110, 177, 1, 115, 151, 33, 17, 68, 646, 339, 8, 1099, 1062, 30, 97, 289, 1, 5, 80, 102, 163, 20, 7, 142, 526, 613, 349, 16, 15, 21, 1442, 16, 15, 507, 506, 16, 185, 501, 338, 120, 64, 367, 395, 587, 1225, 246, 1, 609, 5, 80, 102, 63, 8, 163, 20, 25, 219, 399, 169, 114, 8, 134, 116, 903, 1, 399, 374, 12, 1734, 3, 1071, 954, 85, 382, 50, 59, 449, 930, 319, 520, 461, 13, 722, 281, 410, 1216, 799, 283, 1032]] \n",
      "x_test_word_ids [[1587, 576, 147, 419, 519, 291, 916, 122, 51, 581, 106, 350, 311, 100, 59, 449, 519, 65, 386, 13, 256, 302, 27, 133, 222, 174, 1324, 1126, 273, 239, 1, 127, 146, 79, 349, 264, 457, 191, 1587, 576, 54, 108, 74, 1121, 381, 563, 73, 110, 177, 1, 231, 5, 138, 206, 88, 334, 33, 211, 443, 193, 51, 581, 2, 281, 540, 1, 147, 419, 519, 291, 916, 122, 17, 413, 51, 581, 1, 106, 235, 54, 108, 110, 177, 1, 150, 138, 1830, 885, 2, 91, 1951, 1872, 973, 542, 861, 838, 148, 65, 75, 215, 3, 1587, 576, 244, 312, 47, 2, 40, 574, 697, 697, 350, 29, 55, 38, 311, 100, 1, 63, 143, 56, 117, 128, 129, 311, 100, 1, 235, 54, 108, 2, 77, 126, 222, 280, 284, 47, 1987, 366, 3, 951, 214, 48, 69, 24, 6, 41, 2, 519, 291, 1, 235, 54, 108, 783, 916, 122, 184, 16, 21, 111, 100, 2, 28, 67, 28, 4, 180, 97, 79, 1, 141, 351, 77, 24, 4, 97, 53, 1, 581, 214, 28, 28, 4, 180, 97, 79, 1, 141, 351, 77, 24, 97, 53, 3, 1331, 602, 155, 365, 88, 334, 211, 117, 675, 5, 138, 206, 448, 145, 47, 1, 235, 54, 108, 149, 291, 351, 77, 916, 122, 6, 49, 97, 53, 3, 291, 130, 443, 193, 51, 581, 6, 45, 121, 1, 184, 16, 21, 111, 100, 2, 24, 9, 44, 49, 282, 97, 79, 581, 214, 9, 48, 282, 97, 79, 3, 1711, 816, 418, 758, 244, 481, 2, 53, 738, 468, 187, 495, 311, 100, 235, 54, 108, 149, 291, 351, 77, 916, 122, 48, 97, 53, 1, 443, 193, 9, 49, 44, 49, 282, 97, 79, 3, 1587, 576, 240, 920, 1415, 307, 746, 865, 43, 725, 976, 1108, 259, 710, 998, 1115, 74, 317, 158, 426, 154, 236, 462, 693, 13, 563, 44, 13, 310, 159, 158, 186, 73, 7, 5, 332, 706, 182, 14, 110, 177, 50, 22, 36, 66, 577, 78, 40, 574, 2, 301, 1210, 198, 70, 103, 57, 87, 564, 56, 61, 81, 2, 1820, 653, 15, 62, 107, 116, 2, 198, 70, 15, 55, 38, 332, 600, 2, 985, 17, 1, 33, 211, 511, 828, 55, 38, 577, 786, 2, 525, 922, 3, 23, 951, 214, 48, 69, 24, 6, 41, 2, 519, 21, 1, 1587, 576, 184, 16, 21, 2, 916, 122, 6, 44, 24, 45, 282, 97, 79, 1, 141, 351, 77, 49, 28, 97, 53, 1, 446, 20, 1271, 933, 6, 6, 44, 67, 282, 97, 79, 1, 141, 351, 77, 28, 44, 49, 24, 97, 79, 1, 117, 14, 17, 129, 53, 8, 163, 20, 191, 1518, 653, 398, 88, 334, 3, 21, 130, 443, 193, 51, 581, 46, 121, 1, 184, 16, 21, 2, 6, 9, 67, 44, 48, 282, 97, 79, 581, 214, 6, 6, 6, 49, 44, 48, 282, 97, 79, 3, 34, 56, 81, 519, 291, 1, 1587, 576, 311, 194, 351, 77, 916, 122, 9, 119, 6, 9, 97, 53, 1, 443, 193, 24, 4, 282, 119, 24, 9, 282, 97, 79, 3, 1331, 602, 5, 138, 206, 448, 145, 47, 1, 235, 54, 108, 311, 194, 81, 519, 291, 351, 77, 916, 122, 9, 45, 119, 24, 9, 97, 53, 3, 53, 738, 468, 187, 495, 311, 100, 235, 54, 108, 147, 5, 519, 291, 351, 77, 916, 122, 6, 48, 97, 53, 1, 443, 193, 9, 48, 44, 48, 282, 97, 79, 3, 35, 35, 35, 148, 10, 1333, 216, 487, 883, 558, 317, 1333, 613, 378, 364, 35, 35, 36, 57, 378, 364], [1025, 202, 962, 50, 2, 479, 285, 75, 137, 870, 694, 202, 259, 13, 2177, 405, 76, 84, 106, 207, 21, 666, 609, 5, 18, 59, 449, 123, 493, 386, 65, 649, 246, 9, 26, 69, 2, 611, 118, 330, 557, 47, 1, 1025, 202, 962, 511, 56, 704, 7, 213, 216, 442, 545, 3, 7, 241, 231, 209, 17, 122, 125, 466, 341, 476, 709, 27, 1, 1025, 202, 962, 758, 655, 11, 39, 71, 42, 611, 118, 58, 58, 47, 47, 2, 5, 219, 872, 436, 3, 1022, 1394, 165, 270, 454, 837, 2, 528, 122, 267, 213, 216, 442, 545, 306, 884, 496, 249, 48, 473, 944, 1, 7, 196, 95, 523, 72, 88, 434, 27, 1, 25, 233, 788, 8, 5, 26, 679, 659, 2, 64, 662, 1, 1025, 202, 962, 63, 189, 168, 111, 2, 395, 105, 50, 22, 528, 122, 2, 304, 601, 152, 143, 1, 36, 66, 7, 102, 34, 5, 334, 1048, 17, 2, 84, 118, 27, 1, 511, 56, 1457, 29, 11, 5, 38, 1777, 876, 2, 78, 95, 1, 176, 91, 511, 1038, 11, 1, 92, 524, 104, 8, 33, 713, 1073, 105, 84, 2, 80, 268, 1, 12, 75, 155, 57, 2, 8, 36, 66, 52, 1102, 12, 789, 3, 23, 106, 83, 163, 150, 372, 87, 319, 395, 225, 37, 1, 861, 838, 10, 219, 75, 56, 1447, 342, 800, 800, 1025, 202, 962, 110, 177, 179, 488, 176, 308, 171, 150, 50, 22, 36, 66, 5, 340, 152, 319, 395, 1, 673, 292, 78, 95, 478, 33, 311, 625, 3, 36, 66, 152, 556, 1301, 1, 25, 334, 84, 118, 2, 1306, 116, 854, 17, 3, 36, 66, 148, 65, 425, 429, 31, 175, 1, 172, 47, 151, 10, 84, 169, 1, 31, 11, 260, 182, 36, 66, 94, 258, 2, 27, 578, 3, 583, 125, 1, 673, 292, 10, 219, 84, 169, 231, 665, 11, 1, 71, 36, 66, 104, 8, 152, 451, 5, 26, 424, 312, 2, 467, 118, 1, 36, 66, 260, 182, 36, 66, 42, 286, 31, 36, 66, 151, 101, 2, 3, 23, 171, 230, 160, 179, 261, 609, 5, 26, 80, 261, 52, 253, 1, 64, 7, 1025, 202, 962, 71, 42, 148, 65, 249, 7, 165, 1157, 799, 1419, 1, 1025, 202, 962, 63, 775, 242, 1, 25, 8, 5, 26, 22, 721, 1477, 23, 2, 978, 125, 50, 22, 25, 8, 5, 26, 721, 1477, 2, 978, 125, 1, 10, 18, 101, 36, 439, 838, 218, 268, 137, 870, 694, 202, 259, 11, 3, 12, 75, 172, 47, 1, 36, 30, 995, 319, 129, 1, 36, 66, 572, 111, 416, 135, 565, 278, 704, 7, 442, 545, 3, 275, 694, 962, 976, 2, 479, 328, 708, 75, 36, 1, 267, 36, 215, 694, 202, 259, 3, 290, 8, 7, 16, 95, 291, 306, 884, 2, 27, 578, 1, 439, 838, 83, 8, 88, 736, 964, 3, 39, 328, 708, 36, 267, 36, 749, 39, 215, 694, 202, 259, 3, 172, 47, 1, 25, 349, 160, 396, 68, 396, 335, 399, 372, 61, 25, 26, 978, 125, 2, 238, 146, 3, 115, 47, 1, 103, 746, 37, 11, 1, 39, 328, 708, 36, 1085, 192, 114, 352, 215, 3, 23, 10, 285, 75, 57, 387, 1129, 299, 1025, 202, 962, 101, 50, 22, 36, 12, 384, 203, 3, 25, 87, 167, 898, 152, 68, 80, 102, 1, 199, 352, 8, 442, 545, 3, 12, 75, 101, 31, 598, 1, 36, 2, 763, 405, 104, 8, 704, 7, 442, 545, 3, 171, 230, 995, 319, 129, 242, 71, 36, 2, 611, 88, 1, 290, 277, 83, 8, 609, 142, 5, 234, 160, 1, 106, 36, 182, 698, 39, 66, 2, 285, 181, 1, 39, 66, 509, 405, 36, 704, 7, 25, 192, 3, 163, 150, 1, 25, 83, 8, 91, 143, 2, 306, 230, 3, 290, 125, 51, 647, 52, 62, 11, 537, 277, 299, 36, 37, 31, 5, 26, 10, 1783, 1973, 2, 358, 133, 1, 39, 66, 74, 947, 1668, 630, 68, 15, 1022, 1394, 165, 270, 454, 15, 137, 122, 300, 454, 73, 328, 708, 11, 36, 5, 613, 143, 273, 239, 1, 103, 746, 148, 65, 498, 36, 184, 446, 32, 55, 38, 16, 1755, 51, 1, 36, 72, 565, 278, 7, 442, 545, 2, 1611, 591, 3, 1022, 1394, 165, 270, 454, 2, 423, 299, 39, 308, 272, 651, 209, 36, 42, 704, 7, 442, 545, 1, 39, 101, 36, 8, 442, 545, 649, 773, 2, 5, 129, 53, 3, 39, 152, 1181, 799, 1, 163, 20, 39, 157, 31, 36, 548, 7, 84, 118, 149, 14, 3, 23, 10, 170, 10, 5, 26, 27, 994, 1, 479, 134, 285, 75, 293, 16, 611, 88, 213, 216, 442, 545, 299, 1025, 202, 962, 34, 25, 26, 252, 254, 152, 1157, 1317, 50, 22, 36, 71, 33, 101, 10, 75, 1, 12, 75, 91, 511, 36, 182, 698, 995, 319, 129, 176, 12, 285, 267, 36, 387, 3, 23, 290, 277, 241, 51, 37, 235, 921, 277, 120, 5, 26, 59, 2, 213, 216, 442, 545, 155, 59, 88, 434, 299, 1025, 202, 962, 101, 50, 22, 36, 32, 33, 185, 17, 2, 2177, 405, 155, 59, 88, 434, 1, 825, 10, 185, 17, 2, 663, 327, 188, 1, 163, 20, 17, 60, 114, 384, 203, 1, 25, 72, 8, 1111, 478, 2, 5, 21, 3, 12, 75, 20, 11, 479, 227, 36, 66, 42, 424, 61, 5, 26, 1048, 17, 2, 95, 291, 1, 36, 763, 209, 286, 29, 78, 352, 18, 185, 68, 2, 2508, 2463, 3, 23, 641, 172, 213, 216, 442, 545, 64, 7, 526, 295, 1111, 478, 1, 106, 1025, 202, 962, 548, 1190, 2177, 405, 528, 122, 293, 16, 31, 37, 50, 22, 36, 66, 2, 145, 406, 5, 340, 8, 673, 472, 412, 346, 528, 122, 3, 36, 66, 10, 5, 334, 1048, 17, 2, 84, 118, 1, 25, 192, 10, 1048, 17, 2, 84, 169, 3, 163, 150, 36, 66, 2, 145, 406, 1, 396, 85, 774, 5, 276, 80, 268, 37, 101, 1, 152, 68, 18, 101, 36, 66, 148, 65, 98, 166, 1689, 203, 3, 172, 47, 36, 66, 71, 42, 61, 504, 1, 63, 71, 42, 531, 944, 1, 106, 36, 66, 2, 103, 57, 145, 406, 12, 32, 525, 372, 3, 23, 25, 72, 8, 947, 1668, 630, 68, 96, 20, 401, 622, 2, 147, 5, 26, 95, 291, 1, 39, 7, 185, 1037, 851, 2, 110, 64, 821, 18, 143, 721, 800, 800, 1025, 202, 962, 758, 655, 11, 5, 219, 1230, 841, 50, 22, 39, 8, 5, 26, 308, 272, 872, 188, 2, 18, 1, 308, 272, 935, 371, 872, 436, 3, 25, 801, 1276, 36, 66, 33, 185, 143, 2, 80, 268, 215, 835, 534, 39, 33, 91, 511, 412, 87, 61, 504, 3, 1214, 788, 299, 215, 21, 1, 149, 10, 18, 101, 947, 1668, 630, 68, 72, 61, 20, 103, 1099, 27, 1, 71, 42, 10, 25, 276, 1214, 788, 1, 163, 150, 39, 184, 170, 96, 75, 401, 622, 1, 184, 5, 175, 65, 131, 372, 61, 401, 622, 1, 10, 290, 277, 5, 105, 721, 1477, 3, 12, 75, 115, 47, 1, 36, 66, 424, 124, 157, 31, 11, 5, 175, 401, 622, 2, 402, 733, 1, 179, 488, 5, 694, 971, 143, 3, 23, 947, 1668, 630, 68, 10, 537, 277, 160, 179, 229, 109, 11, 318, 299, 1025, 202, 962, 101, 50, 22, 39, 2, 2177, 405, 3, 42, 619, 52, 64, 39, 2, 89, 188, 1, 39, 34, 5, 542, 59, 2, 65, 649, 2, 100, 769, 1, 39, 384, 203, 25, 8, 5, 26, 854, 17, 2, 86, 32, 1, 39, 12, 285, 695, 338, 789, 75, 3, 23, 234, 31, 215, 704, 2, 423, 254, 1, 1022, 1394, 165, 270, 454, 575, 101, 75, 1, 64, 7, 2, 84, 169, 214, 335, 226, 235, 581, 1411, 28, 4, 121, 1, 1025, 202, 962, 704, 51, 71, 42, 63, 1058, 211, 25, 26, 80, 102, 1, 34, 150, 1025, 202, 962, 605, 1395, 806, 298, 29, 182, 479, 234, 939, 50, 22, 36, 12, 384, 203, 1, 163, 20, 39, 184, 37, 170, 25, 238, 749, 36, 101, 75, 3, 163, 150, 1, 83, 565, 278, 25, 238, 975, 3, 416, 135, 271, 995, 319, 129, 286, 29, 1, 36, 66, 226, 235, 1582, 155, 3, 23, 25, 26, 95, 291, 34, 213, 216, 442, 545, 152, 155, 57, 1, 34, 209, 17, 122, 118, 63, 152, 155, 57, 1, 163, 20, 182, 21, 83, 8, 385, 450, 837, 21, 1, 1025, 202, 962, 110, 64, 29, 199, 352, 2, 109, 116, 50, 22, 36, 66, 425, 429, 143, 11, 1, 106, 104, 87, 1184, 116, 178, 96, 1, 104, 87, 155, 59, 312, 1023, 84, 118, 3, 673, 292, 196, 141, 32, 837, 2, 306, 230, 1951, 1872, 1, 106, 1353, 257, 385, 450, 837, 58, 104, 10, 5, 542, 1409, 140, 2, 203, 418, 1, 163, 150, 36, 66, 104, 87, 565, 278, 1184, 116, 178, 96, 3, 1038, 87, 632, 447, 299, 8, 2, 1, 151, 10, 432, 137, 385, 450, 837, 2, 84, 118, 114, 10, 25, 238, 2, 86, 32, 1, 36, 66, 479, 135, 36, 66, 63, 10, 3, 372, 243, 299, 36, 66, 2, 84, 118, 148, 171, 150, 508, 928, 1, 171, 230, 320, 137, 166, 5, 105, 801, 179, 2, 423, 1, 36, 12, 242, 20, 104, 10, 537, 277, 82, 80, 353, 57, 525, 372, 3, 23, 196, 95, 523, 72, 88, 434, 1, 19, 421, 442, 545, 15, 213, 216, 442, 545, 1128, 185, 247, 17, 1, 25, 8, 5, 26, 1084, 1074, 2, 423, 254, 800, 800, 1025, 202, 962, 101, 50, 22, 83, 64, 7, 37, 157, 1, 19, 421, 442, 545, 10, 508, 295, 3, 106, 36, 66, 34, 554, 7, 147, 280, 175, 29, 52, 63, 152, 651, 209, 1, 36, 66, 32, 89, 27, 133, 260, 182, 352, 18, 2, 789, 1112, 3, 23, 1025, 202, 962, 7, 142, 450, 157, 37, 8, 5, 26, 308, 272, 187, 1082, 2, 18, 1, 106, 204, 101, 7, 185, 1037, 851, 192, 102, 1, 605, 1363, 561, 88, 736, 964, 1, 8, 25, 238, 1129, 299, 1025, 202, 962, 12, 763, 209, 89, 25, 26, 86, 32, 98, 43, 2138, 556, 50, 22, 36, 12, 226, 235, 37, 110, 980, 25, 349, 160, 1, 226, 235, 267, 36, 2, 118, 389, 66, 37, 3, 36, 750, 726, 7, 467, 118, 14, 2, 304, 601, 1, 63, 750, 726, 88, 736, 964, 3, 172, 47, 1, 428, 84, 81, 37, 83, 8, 930, 319, 3, 76, 84, 299, 216, 119, 463, 630, 202, 68, 148, 65, 1038, 87, 75, 25, 26, 1241, 1518, 1, 36, 285, 207, 21, 32, 8, 998, 259, 3, 36, 299, 64, 7, 12, 32, 1, 57, 1038, 87, 76, 84, 623, 887, 286, 152, 68, 160, 179, 1, 104, 57, 286, 87, 185, 143, 3, 172, 47, 1, 36, 12, 384, 203, 25, 8, 644, 1084, 697, 12, 32, 52, 62, 3, 23, 74, 1302, 759, 73], [2118, 1544, 156, 724, 33, 138, 807, 143, 13, 370, 268, 60, 411, 929, 889, 183, 327, 847, 86, 7, 287, 376, 370, 268, 60, 411, 2, 75, 377, 14, 1, 65, 272, 42, 803, 31, 10, 139, 1146, 643, 344, 131, 8, 644, 31, 175, 2, 198, 1365, 1, 25, 197, 152, 68, 18, 131, 309, 20, 8, 653, 335, 1100, 2799, 1134, 408, 2, 5, 26, 155, 57, 136, 542, 3, 555, 384, 153, 2118, 1544, 191, 575, 246, 25, 238, 101, 75, 1, 22, 221, 10, 1146, 643, 286, 143, 11, 1, 1100, 2799, 1134, 408, 491, 32, 581, 324, 535, 23, 13, 60, 411, 1100, 2799, 252, 254, 8, 43, 40, 54, 242, 2, 478, 254, 1, 199, 352, 8, 370, 268, 60, 411, 1, 156, 724, 576, 1267, 476, 89, 18, 457, 370, 30, 60, 411, 1723, 625, 162, 1, 171, 230, 151, 89, 2, 724, 625, 257, 12, 31, 577, 227, 57, 371, 1, 83, 152, 501, 338, 457, 61, 851, 128, 466, 507, 350, 406, 3, 34, 150, 40, 128, 18, 393, 242, 20, 1, 370, 268, 60, 411, 8, 644, 577, 227, 91, 511, 346, 416, 56, 156, 724, 2, 354, 89, 1, 172, 92, 1, 271, 56, 145, 58, 55, 38, 16, 370, 724, 287, 89, 1432, 1371, 64, 662, 521, 225, 577, 227, 12, 257, 406, 586, 37, 586, 813, 155, 1, 33, 620, 273, 294, 85, 34, 370, 268, 60, 411, 12, 183, 327, 3, 13, 370, 268, 60, 411, 156, 724, 33, 138, 807, 143, 64, 662, 813, 155, 370, 268, 60, 411, 168, 34, 56, 134, 1072, 60, 411, 92, 557, 1, 126, 685, 63, 617, 1258, 78, 313, 1298, 141, 17, 587, 273, 294, 85, 2, 438, 992, 1, 106, 370, 268, 60, 411, 577, 227, 252, 254, 1, 63, 5, 340, 1111, 1580, 217, 152, 68, 273, 294, 85, 3, 13, 7, 244, 481, 14, 52, 64, 1, 152, 68, 164, 529, 495, 331, 94, 258, 2, 60, 411, 354, 89, 2, 8, 22, 655, 323, 982, 23, 370, 724, 3, 34, 56, 273, 294, 85, 37, 101, 1, 22, 655, 323, 982, 23, 370, 724, 83, 8, 577, 227, 30, 164, 506, 2, 156, 81, 227, 1239, 1, 7, 287, 376, 2, 75, 377, 14, 803, 101, 476, 89, 2, 8, 1046, 590, 655, 323, 982, 2, 370, 146, 1, 83, 143, 78, 970, 11, 135, 188, 2843, 3, 106, 8, 5, 1310, 60, 411, 98, 38, 1, 152, 68, 40, 103, 83, 32, 182, 301, 304, 601, 358, 133, 192, 466, 507, 1805, 1558, 813, 155, 1, 25, 491, 384, 203, 94, 258, 16, 149, 231, 1390, 11, 3, 13, 204, 11, 309, 1, 55, 38, 16, 10, 48, 4, 121, 2, 370, 268, 60, 411, 114, 331, 94, 258, 354, 89, 2, 8, 655, 323, 982, 370, 724, 1, 92, 134, 421, 16, 176, 170, 10, 290, 277, 68, 394, 40, 89, 3, 10, 152, 68, 913, 60, 114, 221, 8, 689, 217, 22, 655, 323, 982, 23, 2, 579, 529, 1, 10, 2, 221, 10, 335, 232, 89, 2, 8, 218, 1340, 2, 370, 724, 3, 13, 22, 218, 163, 20, 25, 238, 2, 160, 179, 1901, 1901, 52, 62, 1, 273, 294, 85, 34, 370, 268, 60, 411, 531, 215, 183, 188, 1, 312, 26, 43, 40, 34, 370, 268, 60, 411, 114, 189, 1214, 788, 559, 130, 1, 33, 620, 56, 513, 218, 476, 89, 1046, 590, 816, 178, 74, 655, 323, 982, 73, 417, 6, 368, 577, 724, 2, 60, 411, 913, 231, 31, 11, 1810, 473, 535, 23, 97, 988, 270, 60, 411, 688, 65, 131, 233, 1678, 82, 328, 708, 954, 1107, 1, 22, 25, 63, 8, 20, 537, 277, 553, 877, 40, 103, 945, 763, 408, 1295, 60, 411, 178, 829, 30, 872, 436, 1, 92, 287, 686, 553, 1207, 54, 108, 64, 38, 229, 60, 411, 2, 155, 57, 360, 163, 3, 23, 13, 1146, 643, 8, 178, 829, 176, 308, 653, 335, 1100, 2799, 1134, 408, 2, 136, 542, 7, 287, 376, 370, 268, 60, 411, 2, 75, 377, 14, 1, 65, 272, 42, 803, 31, 10, 139, 1146, 643, 344, 131, 8, 644, 31, 175, 2, 198, 1365, 1, 25, 197, 152, 68, 18, 131, 309, 20, 8, 653, 335, 1100, 2799, 1134, 408, 2, 5, 26, 155, 57, 136, 542, 3, 555, 384, 153, 2118, 1544, 191, 575, 246, 25, 238, 101, 75, 1, 22, 221, 10, 1146, 643, 286, 143, 11, 1, 1100, 2799, 1134, 408, 491, 32, 581, 324, 535, 23, 13, 34, 150, 1, 354, 89, 655, 323, 982, 370, 724, 2, 97, 988, 270, 60, 411, 460, 302, 715, 688, 65, 131, 110, 177, 1, 7, 287, 376, 60, 411, 2, 75, 377, 14, 1, 157, 19, 60, 242, 135, 2, 22, 1215, 339, 107, 164, 23, 406, 701, 1, 781, 8, 644, 10, 247, 1068, 2, 1056, 801, 206, 507, 992, 1, 1626, 60, 411, 2, 1146, 643, 8, 644, 813, 841, 1, 25, 219, 114, 8, 308, 272, 623, 57, 2, 3, 106, 39, 111, 27, 212, 29, 1, 60, 411, 1146, 643, 8, 644, 369, 733, 221, 367, 110, 178, 829, 506, 232, 70, 324, 1, 92, 34, 117, 10, 581, 324, 1100, 2799, 1134, 408, 232, 2, 101, 181, 1, 39, 469, 110, 177, 273, 294, 85, 98, 166, 11, 1112, 245, 3, 13]]\n"
     ]
    }
   ],
   "source": [
    "print(len(x_train_word_ids),'\\t',len(x_test_word_ids))\n",
    "print(\"x_train_word_ids:\",x_train_word_ids[:3],'\\nx_test_word_ids',x_test_word_ids[:3])#长度分别是2万和5千   分别打印前3个元素看看\n",
    "#从这里来看 一个大的list 里面的每个小元素都还是list 下面两行代码可以证明"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'list'> 1057 [275, 1099, 1530, 514, 189, 694, 202, 259, 67, 21, 330, 391, 13, 283, 463, 392, 50, 388, 350, 10, 912, 17, 1180, 255, 195, 85, 261, 2811, 113, 203, 13, 207, 21, 9, 69, 1, 694, 202, 259, 103, 38, 4, 78, 4, 187, 1445, 202, 465, 1, 27, 327, 103, 1099, 165, 270, 322, 192, 499, 523, 51, 1044, 3, 171, 207, 1, 275, 694, 962, 976, 2, 196, 95, 307, 288, 1, 505, 72, 7, 165, 1157, 799, 1419, 891, 37, 25, 334, 16, 95, 291, 1064, 591, 227, 368, 2, 84, 118, 3, 173, 118, 2, 64, 731, 207, 308, 2330, 78, 1, 275, 1099, 1004, 87, 568, 245, 1751, 47, 1, 498, 1069, 447, 473, 278, 67, 21, 307, 288, 328, 1587, 2, 143, 330, 391, 565, 278, 52, 1198, 149, 8, 209, 625, 115, 14, 3, 1445, 202, 465, 207, 978, 521, 1135, 1575, 20, 12, 116, 1, 351, 351, 522, 12, 31, 188, 1456, 145, 406, 92, 1172, 371, 429, 287, 1, 39, 66, 2, 878, 501, 1450, 1042, 667, 1190, 1, 896, 250, 585, 238, 1631, 815, 1, 844, 214, 104, 665, 11, 173, 17, 103, 116, 14, 58, 656, 3, 92, 694, 202, 259, 63, 221, 10, 41, 202, 270, 672, 5, 26, 155, 57, 863, 347, 1, 231, 2230, 665, 1111, 1580, 2, 39, 246, 41, 2, 840, 622, 63, 221, 8, 1270, 1106, 30, 375, 1843, 3, 34, 56, 470, 29, 41, 100, 1, 41, 202, 270, 672, 1696, 348, 1, 22, 36, 63, 12, 384, 203, 3, 23, 171, 150, 5, 37, 1, 173, 118, 878, 501, 152, 71, 42, 124, 271, 373, 2047, 146, 365, 61, 3, 7, 283, 463, 392, 157, 37, 1, 25, 8, 508, 295, 1, 22, 36, 66, 556, 1301, 94, 258, 2, 134, 116, 1, 118, 389, 133, 148, 65, 526, 61, 11, 1339, 1975, 3, 915, 180, 352, 718, 188, 36, 66, 25, 952, 373, 60, 1297, 32, 2728, 1299, 225, 37, 1, 36, 9, 28, 714, 491, 88, 434, 7, 70, 323, 187, 84, 118, 539, 116, 1, 601, 87, 94, 258, 104, 21, 695, 217, 1051, 535, 23, 117, 134, 1, 275, 694, 962, 976, 2, 2690, 526, 14, 38, 81, 249, 83, 8, 26, 59, 209, 3, 496, 249, 95, 16, 193, 539, 12, 789, 1, 106, 16, 222, 41, 229, 846, 196, 27, 104, 8, 1083, 655, 29, 252, 254, 3, 652, 1059, 43, 12, 43, 87, 161, 299, 545, 1293, 283, 152, 319, 395, 1, 22, 275, 1099, 285, 267, 36, 66, 185, 10, 365, 957, 206, 1, 229, 29, 404, 1524, 2, 634, 295, 428, 84, 1, 603, 856, 14, 469, 57, 7, 1697, 84, 47, 673, 472, 966, 234, 84, 433, 3, 103, 401, 622, 790, 226, 87, 152, 472, 1, 36, 66, 63, 1159, 502, 241, 231, 11, 39, 2, 288, 397, 805, 285, 3, 36, 66, 32, 586, 37, 586, 143, 2, 3, 23, 114, 101, 694, 202, 259, 91, 353, 57, 2, 8, 632, 447, 837, 1, 106, 545, 1293, 283, 247, 244, 1, 196, 95, 491, 8, 307, 57, 145, 406, 1, 22, 36, 8, 157, 217, 388, 350, 140, 17, 2, 1, 61, 20, 124, 19, 91, 1836, 2, 84, 118, 304, 601, 308, 272, 97, 1660, 1, 36, 57, 735, 234, 25, 276, 304, 601, 3, 23, 199, 192, 469, 706, 331, 1, 57, 120, 846, 196, 253, 88, 22, 1574, 812, 313, 232, 23, 1, 22, 1217, 307, 32, 2353, 87, 152, 782, 1, 91, 246, 419, 589, 21, 5, 340, 8, 25, 238, 3, 36, 66, 25, 173, 174, 21, 611, 846, 196, 221, 10, 3430, 1487, 115, 1961, 1, 149, 172, 1, 36, 66, 1004, 632, 27, 1, 39, 66, 63, 170, 661, 47, 68, 335, 3, 151, 33, 1, 36, 66, 173, 60, 32, 10, 5, 38, 1574, 812, 313, 232, 3, 36, 168, 183, 122, 420, 1420, 15, 427, 816, 630, 30, 846, 465, 63, 32, 12, 1737, 661, 47, 3, 23, 92, 34, 56, 207, 978, 2, 446, 32, 402, 668, 1, 199, 192, 706, 331, 50, 22, 846, 465, 2, 113, 126, 821, 36, 304, 31, 1241, 1181, 1, 106, 36, 170, 109, 188, 3, 57, 8, 109, 188, 11, 36, 83, 387, 11, 3, 23, 34, 56, 569, 632, 526, 295, 1, 283, 463, 392, 52, 110, 11, 22, 49, 17, 1180, 255, 23, 1091, 364, 74, 39, 117, 134, 144, 29, 67, 26, 73, 1, 22, 846, 196, 148, 65, 24, 473, 632, 11, 1, 619, 11, 535, 64, 7, 1, 10, 589, 912, 334, 84, 118, 10, 42, 116, 569, 1004, 632, 447, 3, 846, 465, 10, 2, 8, 685, 1, 514, 322, 30, 496, 1056, 63, 12, 42, 1727, 296, 1, 64, 7, 12, 57, 320, 198, 45, 247, 11, 1, 226, 235, 8, 49, 247, 3, 23, 148, 65, 24, 6, 714, 2, 283, 463, 392, 242, 20, 94, 258, 548, 71, 198, 70, 1, 22, 16, 222, 34, 846, 196, 27, 1, 36, 1697, 84, 152, 68, 1, 25, 8, 12, 218, 272, 2, 3, 36, 285, 525, 922, 588, 84, 1, 335, 949, 789, 1112, 1, 36, 859, 371, 424, 97, 103, 830, 3, 318, 66, 71, 42, 242, 20, 36, 64, 7, 372, 87, 88, 188, 11, 1, 36, 285, 1026, 231, 428, 84, 3, 23, 120, 150, 111, 27, 1, 1069, 447, 2, 38, 142, 160, 208, 63, 170, 10, 853, 2665, 3, 39, 66, 148, 120, 283, 463, 392, 30, 293, 1394, 257, 278, 347, 1, 81, 222, 419, 1, 427, 128, 202, 437, 2, 65, 791, 18, 758, 655, 1, 181, 19, 58, 896, 63, 523, 72, 278, 863, 1, 22, 36, 66, 51, 222, 83, 32, 120, 694, 202, 259, 751, 744, 1, 204, 36, 151, 384, 1, 694, 202, 259, 319, 209, 278, 347, 3, 23, 150, 142, 1, 568, 245, 1751, 473, 370, 2433, 114, 170, 1188, 16, 2, 1620, 2975, 1863, 270, 110, 177, 50, 22, 36, 30, 694, 202, 259, 104, 10, 6, 21, 141, 111, 1, 36, 285, 704, 7, 25, 192, 3, 23, 92, 139, 56, 8, 644, 565, 278, 522, 18, 1, 275, 694, 962, 976, 2, 59, 101, 181, 8, 50, 22, 10, 623, 57, 1, 83, 522, 3, 170, 623, 57, 1, 83, 12, 522, 3, 23]\n"
     ]
    }
   ],
   "source": [
    "print(type(x_train_word_ids[0]),len(x_train_word_ids[0]),x_train_word_ids[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'list'> 486 [6, 187, 442, 128, 13, 612, 1787, 520, 141, 27, 819, 905, 249, 67, 129, 1171, 74, 9, 73, 2147, 129, 622, 728, 163, 20, 140, 27, 133, 102, 34, 127, 968, 1, 18, 2, 2147, 129, 2135, 1474, 7, 5, 1019, 2, 622, 728, 14, 12, 501, 338, 87, 31, 807, 53, 2, 408, 853, 1, 106, 51, 102, 25, 365, 622, 728, 71, 33, 322, 1826, 30, 2215, 1729, 2147, 129, 2135, 1474, 1, 10, 539, 1208, 309, 2135, 1474, 2, 782, 345, 304, 3, 3075, 2025, 7, 2547, 146, 16, 1, 2314, 1775, 1225, 56, 82, 102, 1, 1043, 102, 3276, 340, 1, 136, 2222, 261, 58, 1826, 29, 1, 546, 136, 322, 782, 5, 613, 322, 116, 2542, 3, 1368, 129, 580, 580, 2027, 225, 1, 546, 2222, 2027, 225, 72, 322, 116, 2542, 618, 214, 31, 51, 392, 70, 130, 1, 172, 47, 408, 51, 136, 2222, 3, 317, 336, 266, 228, 50, 622, 728, 306, 884, 47, 408, 51, 322, 116, 2542, 1, 546, 136, 205, 1223, 1, 261, 58, 1826, 29, 1, 286, 408, 853, 329, 109, 1, 104, 71, 33, 10, 539, 5054, 322, 2641, 415, 3, 1602, 129, 622, 728, 25, 365, 1141, 1286, 622, 728, 71, 33, 152, 143, 82, 2215, 1729, 1598, 116, 30, 648, 244, 206, 3, 490, 7, 360, 82, 1, 261, 768, 1287, 1141, 5, 486, 115, 47, 320, 261, 355, 261, 155, 470, 109, 96, 5, 138, 3, 172, 47, 261, 58, 15, 261, 47, 400, 1141, 1286, 5, 138, 1, 382, 209, 1141, 1286, 2, 413, 130, 12, 57, 516, 17, 3, 1141, 1286, 9, 4, 1236, 681, 115, 47, 71, 33, 137, 472, 396, 408, 1270, 1141, 1286, 2, 436, 1690, 15, 525, 372, 1141, 1286, 1028, 611, 2, 140, 608, 3, 317, 336, 266, 228, 50, 1141, 1286, 27, 2111, 782, 2230, 1053, 1, 71, 33, 198, 70, 109, 96, 2, 478, 130, 1, 63, 42, 354, 622, 728, 257, 31, 185, 143, 2, 539, 230, 3, 1756, 129, 622, 728, 2215, 1729, 1756, 129, 2135, 1474, 91, 143, 2, 80, 181, 83, 8, 3075, 2025, 1278, 3, 3075, 2025, 7, 2063, 146, 16, 1, 546, 136, 53, 88, 120, 1881, 111, 1127, 1, 1278, 82, 3, 546, 1602, 176, 2733, 1, 546, 1043, 1043, 1775, 217, 82, 1, 33, 546, 136, 30, 1043, 1775, 20, 334, 105, 72, 249, 123, 1278, 225, 1, 162, 31, 17, 2222, 120, 132, 2222, 61, 46, 4, 3199, 15, 17, 2222, 120, 1881, 111, 70, 27, 1, 2027, 70, 747, 1602, 3, 382, 209, 286, 25, 26, 109, 96, 27, 855, 129, 1503, 340, 1, 145, 455, 157, 261, 82, 102, 3, 317, 336, 266, 228, 50, 12, 57, 163, 20, 12, 728, 1475, 25, 26, 109, 96, 92, 408, 1295, 622, 728, 1, 25, 365, 109, 96, 34, 354, 136, 2371, 231, 665, 2, 71, 42, 206, 185, 132, 3]\n"
     ]
    }
   ],
   "source": [
    "print(type(x_train_word_ids[1]),len(x_train_word_ids[1]),x_train_word_ids[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train_padded_seqs的数据类型: <class 'numpy.ndarray'>\n",
      "x_test_padded_seqs的数据类型: <class 'numpy.ndarray'>\n"
     ]
    }
   ],
   "source": [
    "#max_len=6000  前面已经定义了  这里是对句子的规范化处理  短的补全  长的全部砍掉\n",
    "x_train_padded_seqs=pad_sequences(x_train_word_ids, maxlen=max_len)\n",
    "x_test_padded_seqs=pad_sequences(x_test_word_ids, maxlen=max_len)\n",
    "print(\"x_train_padded_seqs的数据类型:\",type(x_train_padded_seqs))\n",
    "print(\"x_test_padded_seqs的数据类型:\",type(x_test_padded_seqs))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(200000, 6000)"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train_padded_seqs.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(50000, 6000)"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_test_padded_seqs.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[   0,    0,    0, ...,  522,    3,   23],\n",
       "       [   0,    0,    0, ...,  185,  132,    3],\n",
       "       [   0,    0,    0, ...,  799,  283, 1032],\n",
       "       ...,\n",
       "       [   0,    0,    0, ...,  287,  686,    3],\n",
       "       [   0,    0,    0, ...,  123,  493,   73],\n",
       "       [   0,    0,    0, ...,  169,   11,    3]], dtype=int32)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train_padded_seqs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[   0,    0,    0, ...,   57,  378,  364],\n",
       "       [   0,    0,    0, ..., 1302,  759,   73],\n",
       "       [   0,    0,    0, ...,  245,    3,   13],\n",
       "       ...,\n",
       "       [   0,    0,    0, ...,   57,  378,  364],\n",
       "       [   0,    0,    0, ...,  463, 2423, 2423],\n",
       "       [   0,    0,    0, ...,  716,   73,    3]], dtype=int32)"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_test_padded_seqs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "#搭建fasttext()\n",
    "def fasttext():\n",
    "    #搭建模型\n",
    "    model=keras.Sequential([\n",
    "        keras.layers.Embedding(len(vocab)+1,256,input_length=max_len),\n",
    "        keras.layers.GlobalAveragePooling1D(),#对文本数据进行平均池化操作\n",
    "        keras.layers.Dense(14,activation='softmax')\n",
    "    ])\n",
    "    return model#返回这个网络model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(200000, 6000) (200000, 14)\n"
     ]
    }
   ],
   "source": [
    "X,y=x_train_padded_seqs,to_categorical(train['label'])\n",
    "print(X.shape,y.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.engine.sequential.Sequential at 0x7fd7bd8b0ad0>"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model=fasttext()\n",
    "model.compile(loss=\"categorical_crossentropy\",metrics=['accuracy'],optimizer='adam')\n",
    "model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /home/stu_15527388015/.local/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "200000/200000 [==============================] - 663s 3ms/sample - loss: 2.2805 - acc: 0.2689\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.callbacks.History at 0x7fd7be85b810>"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "history=model.fit(X,y,batch_size=1024,epochs=1,shuffle=True)\n",
    "history"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.20152026, 0.22794338, 0.1369917 , ..., 0.01417832, 0.00799624,\n",
       "        0.00523568],\n",
       "       [0.14576998, 0.11636886, 0.26910537, ..., 0.01642348, 0.01147798,\n",
       "        0.00747401],\n",
       "       [0.19430144, 0.17399958, 0.15338787, ..., 0.01642401, 0.00961957,\n",
       "        0.00639861],\n",
       "       ...,\n",
       "       [0.20555207, 0.20180796, 0.14404723, ..., 0.01414263, 0.00766406,\n",
       "        0.0049973 ],\n",
       "       [0.19419995, 0.17950764, 0.15574402, ..., 0.01498436, 0.00825142,\n",
       "        0.00542712],\n",
       "       [0.20485401, 0.21213661, 0.1387157 , ..., 0.01397387, 0.00750431,\n",
       "        0.00490252]], dtype=float32)"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result=model.predict(x_test_padded_seqs)#后面流程就跟之前的一样了\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "###  后面就是把结果转成比赛要求的格式CSV文件提交就OK了  这里关键是主要掌握训练文本和搭建网络的使用"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
